mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
17 lines
272 B
Rust
17 lines
272 B
Rust
// stderr-per-bitwidth
|
|
#[derive(Copy, Clone)]
|
|
union Foo {
|
|
a: isize,
|
|
b: (),
|
|
}
|
|
|
|
enum Bar {
|
|
Boo = [unsafe { Foo { b: () }.a }; 4][3],
|
|
//~^ ERROR evaluation of constant value failed
|
|
//~| uninitialized
|
|
}
|
|
|
|
fn main() {
|
|
assert_ne!(Bar::Boo as isize, 0);
|
|
}
|