blob: 80b7b4246a747a1add6911a671ce087a1a3d4802 [file] [log] [blame]
error[E0382]: use of moved value: `x`
--> $DIR/closure-move-spans.rs:17:13
|
LL | || x;
| -- - variable moved due to use in closure
| |
| value moved into closure here
LL | let y = x; //~ ERROR
| ^ value used here after move
|
= note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
error[E0382]: borrow of moved value: `x`
--> $DIR/closure-move-spans.rs:22:13
|
LL | || x;
| -- - variable moved due to use in closure
| |
| value moved into closure here
LL | let y = &x; //~ ERROR
| ^^ value borrowed here after move
|
= note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
error[E0382]: borrow of moved value: `x`
--> $DIR/closure-move-spans.rs:27:13
|
LL | || x;
| -- - variable moved due to use in closure
| |
| value moved into closure here
LL | let y = &mut x; //~ ERROR
| ^^^^^^ value borrowed here after move
|
= note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0382`.