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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-with-drop-fields.rs:8:5
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
|
|
|
LL | a: String,
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
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<...>`
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
2021-11-14 11:04:25 +00:00
|
|
|
LL | a: std::mem::ManuallyDrop<String>,
|
2021-11-15 03:47:36 +00:00
|
|
|
| +++++++++++++++++++++++ +
|
2018-12-19 19:58:20 +00:00
|
|
|
|
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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-with-drop-fields.rs:16:5
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
|
|
|
LL | a: S,
|
|
|
|
| ^^^^
|
|
|
|
|
|
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<...>`
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
2021-11-14 11:04:25 +00:00
|
|
|
LL | a: std::mem::ManuallyDrop<S>,
|
2021-11-15 03:47:36 +00:00
|
|
|
| +++++++++++++++++++++++ +
|
2018-12-19 19:58:20 +00:00
|
|
|
|
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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-with-drop-fields.rs:21:5
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
|
|
|
LL | a: T,
|
|
|
|
| ^^^^
|
|
|
|
|
|
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<...>`
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
2021-11-14 11:04:25 +00:00
|
|
|
LL | a: std::mem::ManuallyDrop<T>,
|
2021-11-15 03:47:36 +00:00
|
|
|
| +++++++++++++++++++++++ +
|
2018-12-19 19:58:20 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0740`.
|