]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-loan-blocks-move-cc.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / borrowck-loan-blocks-move-cc.nll.stderr
1 error[E0505]: cannot move out of `v` because it is borrowed
2   --> $DIR/borrowck-loan-blocks-move-cc.rs:24:19
3    |
4 LL |     let w = &v;
5    |             -- borrow of `v` occurs here
6 LL |     thread::spawn(move|| {
7    |                   ^^^^^^ move out of `v` occurs here
8 LL |         println!("v={}", *v);
9    |                           - move occurs due to use in closure
10 ...
11 LL |     w.use_ref();
12    |     - borrow later used here
13
14 error[E0505]: cannot move out of `v` because it is borrowed
15   --> $DIR/borrowck-loan-blocks-move-cc.rs:34:19
16    |
17 LL |     let w = &v;
18    |             -- borrow of `v` occurs here
19 LL |     thread::spawn(move|| {
20    |                   ^^^^^^ move out of `v` occurs here
21 LL |         println!("v={}", *v);
22    |                           - move occurs due to use in closure
23 ...
24 LL |     w.use_ref();
25    |     - borrow later used here
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0505`.