rust/src/test/ui/issues/issue-24357.stderr

15 lines
488 B
Plaintext
Raw Normal View History

2018-07-15 21:11:54 +00:00
error[E0382]: use of moved value: `x`
2018-12-25 15:56:47 +00:00
--> $DIR/issue-24357.rs:6:8
2018-07-15 21:11:54 +00:00
|
LL | let f = move || { let y = x; };
| ------- value moved (into closure) here
LL | //~^ NOTE value moved (into closure) here
LL | let z = x;
| ^ value used here after move
|
= note: move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.