]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-union-move-assign.nll.stderr
1 error[E0382]: use of moved value: `u`
2 --> $DIR/borrowck-union-move-assign.rs:27:21
3 |
4 LL | let a = u.a;
5 | --- value moved here
6 LL | let a = u.a; //~ ERROR use of moved value: `u.a`
7 | ^^^ value used here after move
8 |
9 = note: move occurs because `u` has type `U`, which does not implement the `Copy` trait
10
11 error[E0382]: use of moved value: `u`
12 --> $DIR/borrowck-union-move-assign.rs:33:21
13 |
14 LL | let a = u.a;
15 | --- value moved here
16 LL | u.a = A;
17 LL | let a = u.a; // OK
18 | ^^^ value used here after move
19 |
20 = note: move occurs because `u` has type `U`, which does not implement the `Copy` trait
21
22 error[E0382]: use of moved value: `u`
23 --> $DIR/borrowck-union-move-assign.rs:39:21
24 |
25 LL | let a = u.a;
26 | --- value moved here
27 LL | u.b = B;
28 LL | let a = u.a; // OK
29 | ^^^ value used here after move
30 |
31 = note: move occurs because `u` has type `U`, which does not implement the `Copy` trait
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0382`.