Skip to content

Commit

Permalink
Change how the fix_deny_warnings_but_not_others test works to avoid b…
Browse files Browse the repository at this point in the history
…reakage from new compiler suggestions
  • Loading branch information
sunjay committed Jun 10, 2021
1 parent c3a16b3 commit f68cdb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/testsuite/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,10 @@ fn fix_deny_warnings_but_not_others() {
x
}
fn bar() {}
pub fn bar() {
#[allow(unused_mut)]
let mut _y = 4;
}
",
)
.build();
Expand All @@ -570,7 +573,7 @@ fn fix_deny_warnings_but_not_others() {
.env("__CARGO_FIX_YOLO", "1")
.run();
assert!(!p.read_file("src/lib.rs").contains("let mut x = 3;"));
assert!(p.read_file("src/lib.rs").contains("fn bar() {}"));
assert!(p.read_file("src/lib.rs").contains("let mut _y = 4;"));
}

#[cargo_test]
Expand Down

0 comments on commit f68cdb9

Please sign in to comment.