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:
Pietro Albini 2018-10-05 22:33:13 +02:00 committed by GitHub
commit 3810657ae3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 17 deletions

View file

@ -0,0 +1,8 @@
// run-pass
#![deny(unused_mut)]
#![allow(unreachable_code)]
fn main() {
for _ in { return (); 0..3 } {} // ok
}