]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-copy.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.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() {}