mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
11 lines
268 B
Rust
11 lines
268 B
Rust
//@ 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;
|
|
let _thunk = Box::new(move|| { x = 2; });
|
|
//~^ WARN value assigned to `x` is never read
|
|
//~| WARN unused variable: `x`
|
|
}
|