]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-err4.rs
Rollup merge of #107058 - clubby789:eqeq-homoglyph, r=wesleywiser
[rust.git] / tests / ui / consts / const-err4.rs
1 // stderr-per-bitwidth
2 #[derive(Copy, Clone)]
3 union Foo {
4     a: isize,
5     b: (),
6 }
7
8 enum Bar {
9     Boo = [unsafe { Foo { b: () }.a }; 4][3],
10     //~^ ERROR evaluation of constant value failed
11     //~| uninitialized
12 }
13
14 fn main() {
15     assert_ne!(Bar::Boo as isize, 0);
16 }