]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0505]: cannot move out of `v` because it is borrowed |
2 | --> $DIR/borrowck-loan-blocks-move-cc.rs:14:19 | |
b7449926 XL |
3 | | |
4 | LL | let w = &v; | |
48663c56 | 5 | | -- borrow of `v` occurs here |
b7449926 | 6 | LL | thread::spawn(move|| { |
48663c56 XL |
7 | | ^^^^^^ move out of `v` occurs here |
8 | LL | | |
b7449926 | 9 | LL | println!("v={}", *v); |
17df50a5 | 10 | | -- move occurs due to use in closure |
48663c56 XL |
11 | LL | }); |
12 | LL | w.use_ref(); | |
c295e0f8 | 13 | | ----------- borrow later used here |
b7449926 | 14 | |
48663c56 XL |
15 | error[E0505]: cannot move out of `v` because it is borrowed |
16 | --> $DIR/borrowck-loan-blocks-move-cc.rs:24:19 | |
b7449926 XL |
17 | | |
18 | LL | let w = &v; | |
48663c56 | 19 | | -- borrow of `v` occurs here |
b7449926 | 20 | LL | thread::spawn(move|| { |
48663c56 XL |
21 | | ^^^^^^ move out of `v` occurs here |
22 | LL | | |
b7449926 | 23 | LL | println!("v={}", *v); |
17df50a5 | 24 | | -- move occurs due to use in closure |
48663c56 XL |
25 | LL | }); |
26 | LL | w.use_ref(); | |
c295e0f8 | 27 | | ----------- borrow later used here |
b7449926 XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 | ||
48663c56 | 31 | For more information about this error, try `rustc --explain E0505`. |