1 // ignore-tidy-linelength
7 union U2<T: Copy> { // OK
12 a: std::mem::ManuallyDrop<T>,
16 a: String, //~ ERROR unions may not contain fields that need dropping
19 union U32 { // field that does not drop but is not `Copy`, either -- this is the real feature gate test!
20 a: std::cell::RefCell<i32>, //~ ERROR unions with non-`Copy` fields other than `ManuallyDrop<T>` are unstable
24 a: T, //~ ERROR unions may not contain fields that need dropping
27 union U5 { // Having a drop impl is OK