Skip to content

Commit

Permalink
Auto merge of #10785 - ehuss:fix-dead_code-diag, r=Eh2406
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jun 23, 2022
2 parents ed549d8 + 502a9c5 commit a5e08c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testsuite/build.rs
Expand Up @@ -647,7 +647,7 @@ fn cargo_compile_with_warnings_in_the_root_package() {
.build();

p.cargo("build")
.with_stderr_contains("[..]function is never used: `dead`[..]")
.with_stderr_contains("[WARNING] [..]dead[..]")
.run();
}

Expand Down Expand Up @@ -686,7 +686,7 @@ fn cargo_compile_with_warnings_in_a_dep_package() {
.build();

p.cargo("build")
.with_stderr_contains("[..]function is never used: `dead`[..]")
.with_stderr_contains("[WARNING] [..]dead[..]")
.run();

assert!(p.bin("foo").is_file());
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/registry.rs
Expand Up @@ -1923,7 +1923,7 @@ fn upstream_warnings_on_extra_verbose(cargo: fn(&Project, &str) -> Execs) {
.publish();

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

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/standard_lib.rs
Expand Up @@ -316,7 +316,7 @@ fn check_core() {
p.cargo("check -v")
.build_std_arg(&setup, "core")
.target_host()
.with_stderr_contains("[WARNING] [..]unused_fn[..]`")
.with_stderr_contains("[WARNING] [..]unused_fn[..]")
.run();
}

Expand Down

0 comments on commit a5e08c4

Please sign in to comment.