rust/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.stderr
2018-08-15 01:16:05 +02:00

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`.