2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2014-08-04 15:30:38 -05:00
|
|
|
|
|
|
|
// We shouldn't need to rebind a moved upvar as mut if it's already
|
|
|
|
// marked as mut
|
|
|
|
|
|
|
|
pub fn main() {
|
2015-03-03 02:42:26 -06:00
|
|
|
let mut x = 1;
|
2015-04-01 10:12:30 -05:00
|
|
|
let _thunk = Box::new(move|| { x = 2; });
|
2020-05-21 19:00:00 -05:00
|
|
|
//~^ WARN value assigned to `x` is never read
|
|
|
|
//~| WARN unused variable: `x`
|
2014-08-04 15:30:38 -05:00
|
|
|
}
|