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
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-07-03 06:02:47 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0740`.
|