Rollup merge of #54787 - varkor:unused-mut-in-desugaring, r=nikomatsakis
Only warn about unused `mut` in user-written code Fixes https://github.com/rust-lang/rust/issues/54586. r? @pnkfelix cc @blitzerr
This commit is contained in:
commit
3810657ae3
6 changed files with 53 additions and 17 deletions
8
src/test/ui/mut/no-mut-lint-for-desugared-mut.rs
Normal file
8
src/test/ui/mut/no-mut-lint-for-desugared-mut.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// run-pass
|
||||
|
||||
#![deny(unused_mut)]
|
||||
#![allow(unreachable_code)]
|
||||
|
||||
fn main() {
|
||||
for _ in { return (); 0..3 } {} // ok
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue