mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
15 lines
230 B
Rust
15 lines
230 B
Rust
#[derive(Clone)]
|
|
union U {
|
|
a: u8
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
union W {
|
|
a: std::mem::ManuallyDrop<String>
|
|
}
|
|
|
|
impl Copy for U {} // OK
|
|
impl Copy for W {} //~ ERROR the trait `Copy` may not be implemented for this type
|
|
|
|
fn main() {}
|