c7041a60a5
See also the bulletpoint list on #53351.
22 lines
746 B
Plaintext
22 lines
746 B
Plaintext
error[E0504]: cannot move `v` into closure because it is borrowed
|
|
--> $DIR/borrowck-loan-blocks-move-cc.rs:25:27
|
|
|
|
|
LL | let w = &v;
|
|
| - borrow of `v` occurs here
|
|
LL | thread::spawn(move|| {
|
|
LL | println!("v={}", *v);
|
|
| ^ move into closure occurs here
|
|
|
|
error[E0504]: cannot move `v` into closure because it is borrowed
|
|
--> $DIR/borrowck-loan-blocks-move-cc.rs:35:27
|
|
|
|
|
LL | let w = &v;
|
|
| - borrow of `v` occurs here
|
|
LL | thread::spawn(move|| {
|
|
LL | println!("v={}", *v);
|
|
| ^ move into closure occurs here
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0504`.
|