fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// run-rustfix 2 3// Check that capturing a mutable reference by move and assigning to its 4// referent doesn't make the unused mut lint think that it is mutable. 5 6#![deny(unused_mut)] 7 8pub fn mutable_upvar() { 9 let x = &mut 0; 10 //~^ ERROR 11 let _ = move || { 12 *x = 1; 13 }; 14} 15 16fn main() {}