1 #![allow(const_err)] // make sure we cannot allow away the errors tested here
9 union MaybeUninit<T: Copy> {
14 const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
15 //~^ ERROR it is undefined behavior to use this value
17 const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
18 //~^ ERROR it is undefined behavior to use this value
20 const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
21 //~^ ERROR it is undefined behavior to use this value