mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
19 lines
255 B
Rust
19 lines
255 B
Rust
//@ known-bug: rust-lang/rust#128870
|
|
//@ compile-flags: -Zvalidate-mir
|
|
|
|
#[repr(packed)]
|
|
#[repr(u32)]
|
|
enum E {
|
|
A,
|
|
B,
|
|
C,
|
|
}
|
|
|
|
fn main() {
|
|
union InvalidTag {
|
|
int: u32,
|
|
e: E,
|
|
}
|
|
let _invalid_tag = InvalidTag { int: 4 };
|
|
}
|