]> git.proxmox.com Git - rustc.git/blob - tests/ui/opt-in-copy.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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() {}