Skip to content

Commit a510712

Browse files
committed
Auto merge of #13637 - jhpratt:master, r=weihanglo
Remove unnecessary test This removes a test that is blocking rust-lang/rust#116016 from landing. `@dtolnay` suggested removing the test rather than allowing the relevant lints ([comment](rust-lang/rust#116016 (comment))). > The failure is in https://github.com/rust-lang/cargo/blob/77506e57392d94450bb3ed52cf75e3263bbb2792/tests/testsuite/check.rs#L222-L285 which is a 7 year old test for [#3419](#3419), which is from 2 days after the initial implementation of `cargo check` landed in nightly Cargo in [#3296](#3296). > > I would recommend just deleting the test from Cargo. The implementation of `cargo check` has matured enough since then and I don't see anything useful in that test.
2 parents a5b31eb + def06ee commit a510712

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

tests/testsuite/check.rs

-65
Original file line numberDiff line numberDiff line change
@@ -219,71 +219,6 @@ fn issue_3418() {
219219
.run();
220220
}
221221

222-
// Some weirdness that seems to be caused by a crate being built as well as
223-
// checked, but in this case with a proc macro too.
224-
#[cargo_test]
225-
fn issue_3419() {
226-
let p = project()
227-
.file(
228-
"Cargo.toml",
229-
r#"
230-
[package]
231-
name = "foo"
232-
version = "0.0.1"
233-
edition = "2015"
234-
authors = []
235-
236-
[dependencies]
237-
rustc-serialize = "*"
238-
"#,
239-
)
240-
.file(
241-
"src/lib.rs",
242-
r#"
243-
extern crate rustc_serialize;
244-
245-
use rustc_serialize::Decodable;
246-
247-
pub fn take<T: Decodable>() {}
248-
"#,
249-
)
250-
.file(
251-
"src/main.rs",
252-
r#"
253-
extern crate rustc_serialize;
254-
255-
extern crate foo;
256-
257-
#[derive(RustcDecodable)]
258-
pub struct Foo;
259-
260-
fn main() {
261-
foo::take::<Foo>();
262-
}
263-
"#,
264-
)
265-
.build();
266-
267-
Package::new("rustc-serialize", "1.0.0")
268-
.file(
269-
"src/lib.rs",
270-
r#"
271-
pub trait Decodable: Sized {
272-
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
273-
}
274-
pub trait Decoder {
275-
type Error;
276-
fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
277-
-> Result<T, Self::Error>
278-
where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
279-
}
280-
"#,
281-
)
282-
.publish();
283-
284-
p.cargo("check").run();
285-
}
286-
287222
// Check on a dylib should have a different metadata hash than build.
288223
#[cargo_test]
289224
fn dylib_check_preserves_build_cache() {

0 commit comments

Comments
 (0)