1 // revisions: mirunsafeck thirunsafeck
2 // [thirunsafeck]compile-flags: -Z thir-unsafeck
11 a: String, //~ ERROR unions may not contain fields that need dropping
12 b: String, // OK, only one field is reported
17 // `S` doesn't implement `Drop` trait, but still has non-trivial destructor
19 a: S, //~ ERROR unions may not contain fields that need dropping
22 // We don't know if `T` is trivially-destructable or not until trans
24 a: T, //~ ERROR unions may not contain fields that need dropping
28 a: T, // OK, `T` is `Copy`, no destructor