mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
22 lines
398 B
Rust
22 lines
398 B
Rust
struct CantCopyThis;
|
|
|
|
struct IWantToCopyThis {
|
|
but_i_cant: CantCopyThis,
|
|
}
|
|
|
|
impl Copy for IWantToCopyThis {}
|
|
//~^ ERROR the trait `Copy` cannot be implemented for this type
|
|
|
|
enum CantCopyThisEither {
|
|
A,
|
|
B,
|
|
}
|
|
|
|
enum IWantToCopyThisToo {
|
|
ButICant(CantCopyThisEither),
|
|
}
|
|
|
|
impl Copy for IWantToCopyThisToo {}
|
|
//~^ ERROR the trait `Copy` cannot be implemented for this type
|
|
|
|
fn main() {}
|