mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
249 B
Rust
15 lines
249 B
Rust
#[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);
|
|
}
|