]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-union-move.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / borrowck / borrowck-union-move.stderr
1 error[E0382]: use of moved value: `u.n1`
2   --> $DIR/borrowck-union-move.rs:26:17
3    |
4 LL |             let a = u.n1;
5    |                 - value moved here
6 LL |             let a = u.n1; //~ ERROR use of moved value: `u.n1`
7    |                 ^ value used here after move
8    |
9    = note: move occurs because `u.n1` has type `NonCopy`, which does not implement the `Copy` trait
10
11 error[E0382]: use of partially moved value: `u`
12   --> $DIR/borrowck-union-move.rs:31:17
13    |
14 LL |             let a = u.n1;
15    |                 - value moved here
16 LL |             let a = u; //~ ERROR use of partially moved value: `u`
17    |                 ^ value used here after move
18    |
19    = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait
20
21 error[E0382]: use of moved value: `u.n2`
22   --> $DIR/borrowck-union-move.rs:36:17
23    |
24 LL |             let a = u.n1;
25    |                 - value moved here
26 LL |             let a = u.n2; //~ ERROR use of moved value: `u.n2`
27    |                 ^ value used here after move
28    |
29    = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait
30
31 error[E0382]: use of moved value: `u.n`
32   --> $DIR/borrowck-union-move.rs:63:17
33    |
34 LL |             let a = u.n;
35    |                 - value moved here
36 LL |             let a = u.n; //~ ERROR use of moved value: `u.n`
37    |                 ^ value used here after move
38    |
39    = note: move occurs because `u.n` has type `NonCopy`, which does not implement the `Copy` trait
40
41 error[E0382]: use of moved value: `u.c`
42   --> $DIR/borrowck-union-move.rs:68:17
43    |
44 LL |             let a = u.n;
45    |                 - value moved here
46 LL |             let a = u.c; //~ ERROR use of moved value: `u.c`
47    |                 ^ value used here after move
48    |
49    = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait
50
51 error[E0382]: use of partially moved value: `u`
52   --> $DIR/borrowck-union-move.rs:83:17
53    |
54 LL |             let a = u.n;
55    |                 - value moved here
56 LL |             let a = u; //~ ERROR use of partially moved value: `u`
57    |                 ^ value used here after move
58    |
59    = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait
60
61 error: aborting due to 6 previous errors
62
63 For more information about this error, try `rustc --explain E0382`.