1 error[E0505]: cannot move out of `x1` because it is borrowed
2 --> $DIR/borrowck-multiple-captures.rs:12:19
5 | --- borrow of `x1` occurs here
7 LL | thread::spawn(move|| {
8 | ^^^^^^ move out of `x1` occurs here
9 LL | drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed
10 | -- move occurs due to use in closure
13 | ---- borrow later used here
15 error[E0505]: cannot move out of `x2` because it is borrowed
16 --> $DIR/borrowck-multiple-captures.rs:12:19
19 | --- borrow of `x2` occurs here
20 LL | thread::spawn(move|| {
21 | ^^^^^^ move out of `x2` occurs here
22 LL | drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed
23 LL | drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed
24 | -- move occurs due to use in closure
27 | ---- borrow later used here
29 error[E0382]: use of moved value: `x1`
30 --> $DIR/borrowck-multiple-captures.rs:25:19
35 LL | thread::spawn(move|| {
36 | ^^^^^^ value used here after move
37 LL | drop(x1); //~ ERROR capture of moved value: `x1`
38 | -- use occurs due to use in closure
40 = note: move occurs because `x1` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
42 error[E0382]: use of moved value: `x2`
43 --> $DIR/borrowck-multiple-captures.rs:25:19
47 LL | thread::spawn(move|| {
48 | ^^^^^^ value used here after move
49 LL | drop(x1); //~ ERROR capture of moved value: `x1`
50 LL | drop(x2); //~ ERROR capture of moved value: `x2`
51 | -- use occurs due to use in closure
53 = note: move occurs because `x2` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
55 error[E0382]: use of moved value: `x`
56 --> $DIR/borrowck-multiple-captures.rs:36:14
58 LL | drop(x); //~ ERROR cannot move `x` into closure because it is borrowed
60 LL | drop(x); //~ ERROR use of moved value: `x`
61 | ^ value used here after move
63 = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
65 error[E0505]: cannot move out of `x` because it is borrowed
66 --> $DIR/borrowck-multiple-captures.rs:34:19
69 | -- borrow of `x` occurs here
70 LL | thread::spawn(move|| {
71 | ^^^^^^ move out of `x` occurs here
72 LL | drop(x); //~ ERROR cannot move `x` into closure because it is borrowed
73 | - move occurs due to use in closure
76 | --- borrow later used here
78 error[E0382]: use of moved value: `x`
79 --> $DIR/borrowck-multiple-captures.rs:46:14
81 LL | drop(x); //~ ERROR capture of moved value: `x`
83 LL | drop(x); //~ ERROR use of moved value: `x`
84 | ^ value used here after move
86 = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
88 error[E0382]: use of moved value: `x`
89 --> $DIR/borrowck-multiple-captures.rs:44:19
93 LL | thread::spawn(move|| {
94 | ^^^^^^ value used here after move
95 LL | drop(x); //~ ERROR capture of moved value: `x`
96 | - use occurs due to use in closure
98 = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
100 error: aborting due to 8 previous errors
102 Some errors occurred: E0382, E0505.
103 For more information about an error, try `rustc --explain E0382`.