mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
23 lines
400 B
Rust
23 lines
400 B
Rust
|
struct CantCopyThis;
|
||
|
|
||
|
struct IWantToCopyThis {
|
||
|
but_i_cant: CantCopyThis,
|
||
|
}
|
||
|
|
||
|
impl Copy for IWantToCopyThis {}
|
||
|
//~^ ERROR the trait `Copy` may not be implemented for this type
|
||
|
|
||
|
enum CantCopyThisEither {
|
||
|
A,
|
||
|
B,
|
||
|
}
|
||
|
|
||
|
enum IWantToCopyThisToo {
|
||
|
ButICant(CantCopyThisEither),
|
||
|
}
|
||
|
|
||
|
impl Copy for IWantToCopyThisToo {}
|
||
|
//~^ ERROR the trait `Copy` may not be implemented for this type
|
||
|
|
||
|
fn main() {}
|