]> git.proxmox.com Git - rustc.git/blob - src/test/ui/union/union-copy.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / union / union-copy.rs
1 #[derive(Clone)]
2 union U {
3 a: u8
4 }
5
6 #[derive(Clone)]
7 union W {
8 a: std::mem::ManuallyDrop<String>
9 }
10
11 impl Copy for U {} // OK
12 impl Copy for W {} //~ ERROR the trait `Copy` may not be implemented for this type
13
14 fn main() {}