rust/src/test/ui/borrowck/borrowck-union-move.stderr

64 lines
2.4 KiB
Plaintext

error[E0382]: use of moved value: `u.n1`
--> $DIR/borrowck-union-move.rs:36:17
|
LL | let a = u.n1;
| - value moved here
LL | let a = u.n1; //~ ERROR use of moved value: `u.n1`
| ^ value used here after move
|
= note: move occurs because `u.n1` has type `NonCopy`, which does not implement the `Copy` trait
error[E0382]: use of partially moved value: `u`
--> $DIR/borrowck-union-move.rs:41:17
|
LL | let a = u.n1;
| - value moved here
LL | let a = u; //~ ERROR use of partially moved value: `u`
| ^ value used here after move
|
= note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `u.n2`
--> $DIR/borrowck-union-move.rs:46:17
|
LL | let a = u.n1;
| - value moved here
LL | let a = u.n2; //~ ERROR use of moved value: `u.n2`
| ^ value used here after move
|
= note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `u.n`
--> $DIR/borrowck-union-move.rs:73:17
|
LL | let a = u.n;
| - value moved here
LL | let a = u.n; //~ ERROR use of moved value: `u.n`
| ^ value used here after move
|
= note: move occurs because `u.n` has type `NonCopy`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `u.c`
--> $DIR/borrowck-union-move.rs:78:17
|
LL | let a = u.n;
| - value moved here
LL | let a = u.c; //~ ERROR use of moved value: `u.c`
| ^ value used here after move
|
= note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait
error[E0382]: use of partially moved value: `u`
--> $DIR/borrowck-union-move.rs:93:17
|
LL | let a = u.n;
| - value moved here
LL | let a = u; //~ ERROR use of partially moved value: `u`
| ^ value used here after move
|
= note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0382`.