]> git.lizzy.rs Git - rust.git/blob - tests/ui/opt-in-copy.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.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() {}