Skip to content

Commit 88bafd1

Browse files
committed
Change tests to support changes to suggestion
`rustc` will start marking the suggestions for prefacing unused bindings with underscores as "maybe incorrect", which makes them no longer auto applicable by `rustfix`. Change done at rust-lang/rust#120470.
1 parent aa18926 commit 88bafd1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/testsuite/fix.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,7 @@ fn fix_shared_cross_workspace() {
15021502
// [FIXED] bar/src/../../foo/src/shared.rs (2 fixes)
15031503
// [FIXED] foo/src/shared.rs (2 fixes)
15041504
p.cargo("fix --allow-no-vcs")
1505+
.env("__CARGO_FIX_YOLO", "1")
15051506
.with_stderr_unordered(
15061507
"\
15071508
[CHECKING] foo v0.1.0 [..]

tests/testsuite/messages.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn deduplicate_messages_basic() {
6060
let rustc_message = raw_rustc_output(&p, "src/lib.rs", &[]);
6161
let expected_output = format!(
6262
"{}\
63-
warning: `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)
63+
warning: `foo` (lib) generated 1 warning[..]
6464
warning: `foo` (lib test) generated 1 warning (1 duplicate)
6565
[FINISHED] [..]
6666
[EXECUTABLE] unittests src/lib.rs (target/debug/deps/foo-[..][EXE])
@@ -103,7 +103,7 @@ fn deduplicate_messages_mismatched_warnings() {
103103
let expected_output = format!(
104104
"\
105105
{}\
106-
warning: `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)
106+
warning: `foo` (lib) generated 1 warning[..]
107107
{}\
108108
warning: `foo` (lib test) generated 2 warnings (1 duplicate)
109109
[FINISHED] [..]

0 commit comments

Comments
 (0)