]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0382]: use of moved value: `x` |
136023e0 | 2 | --> $DIR/union-move.rs:29:18 |
1b1a35ee XL |
3 | | |
4 | LL | fn test1(x: U1) { | |
5 | | - move occurs because `x` has type `U1`, which does not implement the `Copy` trait | |
6 | ... | |
7 | LL | move_out(x.f1_nocopy); | |
8 | | ----------- value moved here | |
9 | LL | move_out(x.f2_nocopy); | |
10 | | ^^^^^^^^^^^ value used here after move | |
11 | ||
12 | error[E0382]: use of moved value: `x` | |
136023e0 | 13 | --> $DIR/union-move.rs:45:18 |
1b1a35ee XL |
14 | | |
15 | LL | fn test3(x: U1) { | |
16 | | - move occurs because `x` has type `U1`, which does not implement the `Copy` trait | |
17 | ... | |
18 | LL | move_out(x.f2_nocopy); | |
19 | | ----------- value moved here | |
20 | LL | move_out(x.f3_copy); | |
21 | | ^^^^^^^^^ value used here after move | |
22 | ||
23 | error[E0509]: cannot move out of type `U2`, which implements the `Drop` trait | |
136023e0 | 24 | --> $DIR/union-move.rs:52:18 |
1b1a35ee XL |
25 | | |
26 | LL | move_out(x.f1_nocopy); | |
27 | | ^^^^^^^^^^^ | |
28 | | | | |
29 | | cannot move out of here | |
064997fb | 30 | | move occurs because `x.f1_nocopy` has type `ManuallyDrop<RefCell<i32>>`, which does not implement the `Copy` trait |
1b1a35ee XL |
31 | |
32 | error: aborting due to 3 previous errors | |
33 | ||
34 | Some errors have detailed explanations: E0382, E0509. | |
35 | For more information about an error, try `rustc --explain E0382`. |