]>
Commit | Line | Data |
---|---|---|
5099ac24 | 1 | error[E0740]: unions cannot contain fields that may need dropping |
136023e0 | 2 | --> $DIR/union-with-drop-fields.rs:11:5 |
e74abb32 XL |
3 | | |
4 | LL | a: String, | |
5 | | ^^^^^^^^^ | |
6 | | | |
5099ac24 FG |
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 | |
e74abb32 | 9 | | |
3c0e092e XL |
10 | LL | a: std::mem::ManuallyDrop<String>, |
11 | | +++++++++++++++++++++++ + | |
e74abb32 | 12 | |
5099ac24 | 13 | error[E0740]: unions cannot contain fields that may need dropping |
136023e0 | 14 | --> $DIR/union-with-drop-fields.rs:19:5 |
e74abb32 XL |
15 | | |
16 | LL | a: S, | |
17 | | ^^^^ | |
18 | | | |
5099ac24 FG |
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 | |
e74abb32 | 21 | | |
3c0e092e XL |
22 | LL | a: std::mem::ManuallyDrop<S>, |
23 | | +++++++++++++++++++++++ + | |
e74abb32 | 24 | |
5099ac24 | 25 | error[E0740]: unions cannot contain fields that may need dropping |
136023e0 | 26 | --> $DIR/union-with-drop-fields.rs:24:5 |
e74abb32 XL |
27 | | |
28 | LL | a: T, | |
29 | | ^^^^ | |
30 | | | |
5099ac24 FG |
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 | |
e74abb32 | 33 | | |
3c0e092e XL |
34 | LL | a: std::mem::ManuallyDrop<T>, |
35 | | +++++++++++++++++++++++ + | |
e74abb32 XL |
36 | |
37 | error: aborting due to 3 previous errors | |
38 | ||
39 | For more information about this error, try `rustc --explain E0740`. |