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 22:26:52 +00:00
error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
2022-06-30 02:33:18 +00:00
--> $DIR/issue-41073.rs:2:5
2019-07-03 11:02:47 +00:00
|
LL | a: A,
| ^^^^
|
2023-03-07 22:26:52 +00: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 11:02:47 +00:00
|
2021-11-14 11:04:25 +00:00
LL | a: std::mem::ManuallyDrop<A>,
2021-11-15 03:47:36 +00:00
| +++++++++++++++++++++++ +
2019-07-03 11:02:47 +00:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0740`.