From f68cdb9947993392783b5b85c1f9291ceb593bde Mon Sep 17 00:00:00 2001 From: Sunjay Varma Date: Thu, 10 Jun 2021 16:49:29 -0700 Subject: [PATCH] Change how the fix_deny_warnings_but_not_others test works to avoid breakage from new compiler suggestions --- tests/testsuite/fix.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index 8ac10f40af6..65583ffb859 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -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(); @@ -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]