2019-04-22 08:40:08 +01:00
|
|
|
error[E0382]: use of moved value: `u`
|
|
|
|
--> $DIR/borrowck-union-move-assign.rs:17:21
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2022-06-29 22:33:18 -04:00
|
|
|
LL | let mut u = U { a: ManuallyDrop::new(A) };
|
2019-04-22 08:40:08 +01:00
|
|
|
| ----- move occurs because `u` has type `U`, which does not implement the `Copy` trait
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | let a = u.a;
|
2019-04-22 08:40:08 +01:00
|
|
|
| --- value moved here
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let a = u.a;
|
2019-04-22 08:40:08 +01:00
|
|
|
| ^^^ value used here after move
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|