mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
21 lines
593 B
Plaintext
21 lines
593 B
Plaintext
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?
|
|
= note: `#[warn(unused_assignments)]` on by default
|
|
|
|
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?
|
|
= note: `#[warn(unused_variables)]` on by default
|
|
|
|
warning: 2 warnings emitted
|
|
|