|  | 
| 1 |  | -error[E0740]: unions may not contain fields that need dropping | 
|  | 1 | +error[E0740]: unions cannot contain fields that may need dropping | 
| 2 | 2 |   --> $DIR/union-with-drop-fields.rs:11:5 | 
| 3 | 3 |    | | 
| 4 | 4 | LL |     a: String, | 
| 5 | 5 |    |     ^^^^^^^^^ | 
| 6 | 6 |    | | 
| 7 |  | -help: wrap the type with `std::mem::ManuallyDrop` and ensure it is manually dropped | 
|  | 7 | +   = note: a type is guaranteed not to need dropping when it implements `Copy`, or when it is the special `ManuallyDrop<_>` type | 
|  | 8 | +help: when the type does not implement `Copy`, wrap it inside a `ManuallyDrop<_>` and ensure it is manually dropped | 
| 8 | 9 |    | | 
| 9 | 10 | LL |     a: std::mem::ManuallyDrop<String>, | 
| 10 | 11 |    |        +++++++++++++++++++++++      + | 
| 11 | 12 | 
 | 
| 12 |  | -error[E0740]: unions may not contain fields that need dropping | 
|  | 13 | +error[E0740]: unions cannot contain fields that may need dropping | 
| 13 | 14 |   --> $DIR/union-with-drop-fields.rs:19:5 | 
| 14 | 15 |    | | 
| 15 | 16 | LL |     a: S, | 
| 16 | 17 |    |     ^^^^ | 
| 17 | 18 |    | | 
| 18 |  | -help: wrap the type with `std::mem::ManuallyDrop` and ensure it is manually dropped | 
|  | 19 | +   = note: a type is guaranteed not to need dropping when it implements `Copy`, or when it is the special `ManuallyDrop<_>` type | 
|  | 20 | +help: when the type does not implement `Copy`, wrap it inside a `ManuallyDrop<_>` and ensure it is manually dropped | 
| 19 | 21 |    | | 
| 20 | 22 | LL |     a: std::mem::ManuallyDrop<S>, | 
| 21 | 23 |    |        +++++++++++++++++++++++ + | 
| 22 | 24 | 
 | 
| 23 |  | -error[E0740]: unions may not contain fields that need dropping | 
|  | 25 | +error[E0740]: unions cannot contain fields that may need dropping | 
| 24 | 26 |   --> $DIR/union-with-drop-fields.rs:24:5 | 
| 25 | 27 |    | | 
| 26 | 28 | LL |     a: T, | 
| 27 | 29 |    |     ^^^^ | 
| 28 | 30 |    | | 
| 29 |  | -help: wrap the type with `std::mem::ManuallyDrop` and ensure it is manually dropped | 
|  | 31 | +   = note: a type is guaranteed not to need dropping when it implements `Copy`, or when it is the special `ManuallyDrop<_>` type | 
|  | 32 | +help: when the type does not implement `Copy`, wrap it inside a `ManuallyDrop<_>` and ensure it is manually dropped | 
| 30 | 33 |    | | 
| 31 | 34 | LL |     a: std::mem::ManuallyDrop<T>, | 
| 32 | 35 |    |        +++++++++++++++++++++++ + | 
|  | 
0 commit comments