4 unsafe { std::mem::transmute(()) }
5 //~^ ERROR evaluation of constant value failed
6 //~| WARN the type `!` does not permit zero-initialization [invalid_value]
9 // Type defined in a submodule, so that it is not "visibly"
10 // uninhabited (which would change interpreter behavior).
12 #[derive(Clone, Copy)]
15 #[derive(Clone, Copy)]
16 pub struct Empty(Void
);
19 const FOO
: [empty
::Empty
; 3] = [foo(); 3];
21 const BAR
: [empty
::Empty
; 3] = [unsafe { std::mem::transmute(()) }
; 3];
22 //~^ ERROR it is undefined behavior to use this value
23 //~| WARN the type `empty::Empty` does not permit zero-initialization