2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2014-08-04 13:30:38 -07: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 10:42:26 +02:00
|
|
|
let mut x = 1;
|
2015-04-01 11:12:30 -04:00
|
|
|
let _thunk = Box::new(move|| { x = 2; });
|
2020-05-22 00:00:00 +00:00
|
|
|
//~^ WARN value assigned to `x` is never read
|
|
|
|
//~| WARN unused variable: `x`
|
2014-08-04 13:30:38 -07:00
|
|
|
}
|