blob: f308028bdd7b6e17cf929ee190fc9d257f778478 [file] [log] [blame] [edit]
//! Regression test for https://github.com/rust-lang/rust/issues/11958
//@ run-pass
// We shouldn't need to rebind a moved upvar as mut if it's already
// marked as mut
pub fn main() {
let mut x = 1;
//~^ WARN unused variable: `x`
let _thunk = Box::new(move|| { x = 2; });
//~^ WARN value captured by `x` is never read
//~| WARN value assigned to `x` is never read
}