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