]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-copy.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[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() {}