blob: 3ae1912eb10bf4d7e82d2e4b48fa3acc00d5b2ae [file] [log] [blame]
error[E0382]: use of moved value: `x`
--> $DIR/closure-move-spans.rs:7: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:12: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:17: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`.