1 #![feature(untagged_unions)]
3 #![deny(unions_with_drop_fields)]
10 a: String, //~ ERROR union contains a field with possibly non-trivial drop code
11 b: String, // OK, only one field is reported
16 // `S` doesn't implement `Drop` trait, but still has non-trivial destructor
18 a: S, //~ ERROR union contains a field with possibly non-trivial drop code
21 // We don't know if `T` is trivially-destructable or not until trans
23 a: T, //~ ERROR union contains a field with possibly non-trivial drop code
27 a: T, // OK, `T` is `Copy`, no destructor