1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Clone)] union U { a: u8 } #[derive(Clone)] union W { a: std::mem::ManuallyDrop<String> } impl Copy for U {} // OK impl Copy for W {} //~ ERROR the trait `Copy` cannot be implemented for this type fn main() {}