2020-05-21 19:00:00 -05:00
|
|
|
warning: value assigned to `x` is never read
|
|
|
|
--> $DIR/issue-11958.rs:8:36
|
|
|
|
|
|
|
|
|
LL | let _thunk = Box::new(move|| { x = 2; });
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(unused_assignments)]` on by default
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
warning: unused variable: `x`
|
|
|
|
--> $DIR/issue-11958.rs:8:36
|
|
|
|
|
|
|
|
|
LL | let _thunk = Box::new(move|| { x = 2; });
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(unused_variables)]` on by default
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
warning: 2 warnings emitted
|
|
|
|
|