Skip to content

Commit f68cdb9

Browse files
committed
Change how the fix_deny_warnings_but_not_others test works to avoid breakage from new compiler suggestions
1 parent c3a16b3 commit f68cdb9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/testsuite/fix.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,10 @@ fn fix_deny_warnings_but_not_others() {
561561
x
562562
}
563563
564-
fn bar() {}
564+
pub fn bar() {
565+
#[allow(unused_mut)]
566+
let mut _y = 4;
567+
}
565568
",
566569
)
567570
.build();
@@ -570,7 +573,7 @@ fn fix_deny_warnings_but_not_others() {
570573
.env("__CARGO_FIX_YOLO", "1")
571574
.run();
572575
assert!(!p.read_file("src/lib.rs").contains("let mut x = 3;"));
573-
assert!(p.read_file("src/lib.rs").contains("fn bar() {}"));
576+
assert!(p.read_file("src/lib.rs").contains("let mut _y = 4;"));
574577
}
575578

576579
#[cargo_test]

0 commit comments

Comments
 (0)