rust/tests/ui/union/issue-41073.stderr

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

16 lines
535 B
Plaintext
Raw Normal View History

2023-03-07 16:26:52 -06:00
error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
2022-06-29 21:33:18 -05:00
--> $DIR/issue-41073.rs:2:5
2019-07-03 06:02:47 -05:00
|
LL | a: A,
| ^^^^
|
2023-03-07 16:26:52 -06:00
= note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
help: wrap the field type in `ManuallyDrop<...>`
2019-07-03 06:02:47 -05:00
|
2021-11-14 05:04:25 -06:00
LL | a: std::mem::ManuallyDrop<A>,
2021-11-14 21:47:36 -06:00
| +++++++++++++++++++++++ +
2019-07-03 06:02:47 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0740`.