]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err4.rs
Do not suggest `let_else` if no bindings would be introduced
[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 it is undefined behavior to use this value
11 }
12
13 fn main() {
14     assert_ne!(Bar::Boo as isize, 0);
15 }