mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
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](https://github.com/rust-lang/rust/pull/116016#issuecomment-2016649022)).
> The failure is in 77506e5739/tests/testsuite/check.rs (L222-L285)
which is a 7 year old test for [rust-lang/cargo#3419](https://github.com/rust-lang/cargo/issues/3419), which is from 2 days after the initial implementation of `cargo check` landed in nightly Cargo in [rust-lang/cargo#3296](https://github.com/rust-lang/cargo/pull/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.
This commit is contained in:
commit
a510712d05
@ -219,71 +219,6 @@ fn issue_3418() {
|
||||
.run();
|
||||
}
|
||||
|
||||
// Some weirdness that seems to be caused by a crate being built as well as
|
||||
// checked, but in this case with a proc macro too.
|
||||
#[cargo_test]
|
||||
fn issue_3419() {
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
edition = "2015"
|
||||
authors = []
|
||||
|
||||
[dependencies]
|
||||
rustc-serialize = "*"
|
||||
"#,
|
||||
)
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use rustc_serialize::Decodable;
|
||||
|
||||
pub fn take<T: Decodable>() {}
|
||||
"#,
|
||||
)
|
||||
.file(
|
||||
"src/main.rs",
|
||||
r#"
|
||||
extern crate rustc_serialize;
|
||||
|
||||
extern crate foo;
|
||||
|
||||
#[derive(RustcDecodable)]
|
||||
pub struct Foo;
|
||||
|
||||
fn main() {
|
||||
foo::take::<Foo>();
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.build();
|
||||
|
||||
Package::new("rustc-serialize", "1.0.0")
|
||||
.file(
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
pub trait Decodable: Sized {
|
||||
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
|
||||
}
|
||||
pub trait Decoder {
|
||||
type Error;
|
||||
fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
|
||||
-> Result<T, Self::Error>
|
||||
where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.publish();
|
||||
|
||||
p.cargo("check").run();
|
||||
}
|
||||
|
||||
// Check on a dylib should have a different metadata hash than build.
|
||||
#[cargo_test]
|
||||
fn dylib_check_preserves_build_cache() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user