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-30 09:17:49 -05:00
|
|
|
--> $DIR/field_checks.rs:24:5
|
2019-10-21 03:12:09 -05:00
|
|
|
|
|
|
|
|
LL | a: String,
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
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-10-21 03:12:09 -05:00
|
|
|
|
|
2021-11-14 05:04:25 -06:00
|
|
|
LL | a: std::mem::ManuallyDrop<String>,
|
2021-11-14 21:47:36 -06:00
|
|
|
| +++++++++++++++++++++++ +
|
2019-10-21 03:12:09 -05:00
|
|
|
|
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-30 09:17:49 -05:00
|
|
|
--> $DIR/field_checks.rs:28:5
|
2022-06-29 21:33:18 -05:00
|
|
|
|
|
|
|
|
LL | a: std::cell::RefCell<i32>,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
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<...>`
|
2022-06-29 21:33:18 -05:00
|
|
|
|
|
|
|
|
LL | a: std::mem::ManuallyDrop<std::cell::RefCell<i32>>,
|
|
|
|
| +++++++++++++++++++++++ +
|
|
|
|
|
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-30 09:17:49 -05:00
|
|
|
--> $DIR/field_checks.rs:32:5
|
2019-10-21 03:12:09 -05:00
|
|
|
|
|
|
|
|
LL | a: T,
|
|
|
|
| ^^^^
|
|
|
|
|
|
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-10-21 03:12:09 -05:00
|
|
|
|
|
2021-11-14 05:04:25 -06:00
|
|
|
LL | a: std::mem::ManuallyDrop<T>,
|
2021-11-14 21:47:36 -06:00
|
|
|
| +++++++++++++++++++++++ +
|
2019-10-21 03:12:09 -05:00
|
|
|
|
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-30 09:17:49 -05:00
|
|
|
--> $DIR/field_checks.rs:44:5
|
2022-06-11 00:12:57 -05:00
|
|
|
|
|
|
|
|
LL | nest: U5,
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
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<...>`
|
2022-06-11 00:12:57 -05:00
|
|
|
|
|
|
|
|
LL | nest: std::mem::ManuallyDrop<U5>,
|
|
|
|
| +++++++++++++++++++++++ +
|
|
|
|
|
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-30 09:17:49 -05:00
|
|
|
--> $DIR/field_checks.rs:48:5
|
|
|
|
|
|
|
|
|
LL | nest: [U5; 0],
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
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<...>`
|
2022-06-30 09:17:49 -05:00
|
|
|
|
|
|
|
|
LL | nest: std::mem::ManuallyDrop<[U5; 0]>,
|
|
|
|
| +++++++++++++++++++++++ +
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2017-12-06 03:18:03 -06:00
|
|
|
|
2022-06-29 21:33:18 -05:00
|
|
|
For more information about this error, try `rustc --explain E0740`.
|