]> git.lizzy.rs Git - rust.git/blob - src/test/ui/opt-in-copy.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / opt-in-copy.rs
1 struct CantCopyThis;
2
3 struct IWantToCopyThis {
4     but_i_cant: CantCopyThis,
5 }
6
7 impl Copy for IWantToCopyThis {}
8 //~^ ERROR the trait `Copy` may not be implemented for this type
9
10 enum CantCopyThisEither {
11     A,
12     B,
13 }
14
15 enum IWantToCopyThisToo {
16     ButICant(CantCopyThisEither),
17 }
18
19 impl Copy for IWantToCopyThisToo {}
20 //~^ ERROR the trait `Copy` may not be implemented for this type
21
22 fn main() {}