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