Closed
Description
Given the following code (playground):
union U {
value: Vec<isize>,
}
The current output is:
error[E0740]: unions may not contain fields that need dropping
--> src/lib.rs:2:5
|
2 | value: Vec<isize>,
| ^^^^^^^^^^^^^^^^^
|
note: `std::mem::ManuallyDrop` can be used to wrap the type
--> src/lib.rs:2:5
|
2 | value: Vec<isize>,
| ^^^^^^^^^^^^^^^^^
Ideally the output should look like:
error[E0740]: unions may not contain fields that need dropping
--> src/lib.rs:2:5
|
2 | value: Vec<isize>,
| ^^^^^^^^^^^^^^^^^
|
note: `std::mem::ManuallyDrop` can be used to wrap the type
--> src/lib.rs:2:5
|
2 | value: std::mem::ManuallyDrop<Vec<isize>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^