Skip to content

Commit 4020d03

Browse files
authored
Merge pull request #2219 from sinkuu/compiletest0.3
Use compiletest 0.3
2 parents 088555c + b178998 commit 4020d03

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ clippy_lints = { version = "0.0.169", path = "clippy_lints" }
4242
cargo_metadata = "0.2"
4343

4444
[dev-dependencies]
45-
compiletest_rs = "0.2.7"
45+
compiletest_rs = "0.3"
4646
duct = "0.8.2"
4747
lazy_static = "0.2"
4848
regex = "0.2"

tests/compile-test.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ fn run_mode(dir: &'static str, mode: &'static str) {
2222
}
2323

2424
config.mode = cfg_mode;
25-
config.build_base = PathBuf::from("target/debug/test_build_base");
25+
config.build_base = {
26+
let mut path = std::env::current_dir().unwrap();
27+
path.push("target/debug/test_build_base");
28+
path
29+
};
2630
config.src_base = PathBuf::from(format!("tests/{}", dir));
2731
config.rustc_path = clippy_driver_path();
2832

tests/ui/cstring.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
error: function is never used: `temporary_cstring`
2-
--> $DIR/cstring.rs:4:1
3-
|
4-
4 | fn temporary_cstring() {
5-
| ^^^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `-D dead-code` implied by `-D warnings`
8-
91
error: you are getting the inner pointer of a temporary `CString`
102
--> $DIR/cstring.rs:7:5
113
|

0 commit comments

Comments
 (0)