os-rust/tests/ui/borrowck/borrowck-union-move-assign.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
529 B
Text
Raw Normal View History

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) };
| ----- 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;
| --- value moved here
2019-03-09 15:03:44 +03:00
LL | let a = u.a;
| ^^^ value used here after move
2018-08-08 14:28:26 +02: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`.