Skip to content

Commit a5e08c4

Browse files
committed
Auto merge of #10785 - ehuss:fix-dead_code-diag, r=Eh2406
Fix tests due to change in dead_code diagnostic. rust-lang/rust#97853 changed some diagnostics which is causing some tests to fail on the latest nightly. This updates the tests to work on both stable and nightly.
2 parents ed549d8 + 502a9c5 commit a5e08c4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/testsuite/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ fn cargo_compile_with_warnings_in_the_root_package() {
647647
.build();
648648

649649
p.cargo("build")
650-
.with_stderr_contains("[..]function is never used: `dead`[..]")
650+
.with_stderr_contains("[WARNING] [..]dead[..]")
651651
.run();
652652
}
653653

@@ -686,7 +686,7 @@ fn cargo_compile_with_warnings_in_a_dep_package() {
686686
.build();
687687

688688
p.cargo("build")
689-
.with_stderr_contains("[..]function is never used: `dead`[..]")
689+
.with_stderr_contains("[WARNING] [..]dead[..]")
690690
.run();
691691

692692
assert!(p.bin("foo").is_file());

tests/testsuite/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ fn upstream_warnings_on_extra_verbose(cargo: fn(&Project, &str) -> Execs) {
19231923
.publish();
19241924

19251925
cargo(&p, "build -vv")
1926-
.with_stderr_contains("[..]warning: function is never used[..]")
1926+
.with_stderr_contains("[WARNING] [..]unused[..]")
19271927
.run();
19281928
}
19291929

tests/testsuite/standard_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn check_core() {
316316
p.cargo("check -v")
317317
.build_std_arg(&setup, "core")
318318
.target_host()
319-
.with_stderr_contains("[WARNING] [..]unused_fn[..]`")
319+
.with_stderr_contains("[WARNING] [..]unused_fn[..]")
320320
.run();
321321
}
322322

0 commit comments

Comments
 (0)