]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err4.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / 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 }