mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
20 lines
347 B
Rust
20 lines
347 B
Rust
// revisions: mirunsafeck thirunsafeck
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
union U {
|
|
a: str,
|
|
//~^ ERROR the size for values of type
|
|
//~| ERROR field must implement `Copy`
|
|
|
|
b: u8,
|
|
}
|
|
|
|
union W {
|
|
a: u8,
|
|
b: str,
|
|
//~^ ERROR the size for values of type
|
|
//~| ERROR field must implement `Copy`
|
|
}
|
|
|
|
fn main() {}
|