fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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