rust/tests/ui/consts/const-err4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
272 B
Rust
Raw Normal View History

// 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);
}