diff --git a/Cargo.toml b/Cargo.toml index 047d966be66..2fbf6d17ce4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ clippy_lints = { version = "0.0.169", path = "clippy_lints" } cargo_metadata = "0.2" [dev-dependencies] -compiletest_rs = "0.2.7" +compiletest_rs = "0.3" duct = "0.8.2" lazy_static = "0.2" regex = "0.2" diff --git a/tests/compile-test.rs b/tests/compile-test.rs index be8793215dc..bd968cc6009 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -22,7 +22,11 @@ fn run_mode(dir: &'static str, mode: &'static str) { } config.mode = cfg_mode; - config.build_base = PathBuf::from("target/debug/test_build_base"); + config.build_base = { + let mut path = std::env::current_dir().unwrap(); + path.push("target/debug/test_build_base"); + path + }; config.src_base = PathBuf::from(format!("tests/{}", dir)); config.rustc_path = clippy_driver_path(); diff --git a/tests/ui/cstring.stderr b/tests/ui/cstring.stderr index ddb74ce9cac..c3dd9cf83f6 100644 --- a/tests/ui/cstring.stderr +++ b/tests/ui/cstring.stderr @@ -1,11 +1,3 @@ -error: function is never used: `temporary_cstring` - --> $DIR/cstring.rs:4:1 - | -4 | fn temporary_cstring() { - | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: `-D dead-code` implied by `-D warnings` - error: you are getting the inner pointer of a temporary `CString` --> $DIR/cstring.rs:7:5 |