Merge pull request #2219 from sinkuu/compiletest0.3

Use compiletest 0.3
This commit is contained in:
Oliver Schneider 2017-11-09 09:33:26 +01:00 committed by GitHub
commit 4020d03f09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 10 deletions

View file

@ -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"

View file

@ -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();

View file

@ -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
|