1 #![feature(never_type)]
2 #![deny(uninhabited_static)]
6 static VOID: Void; //~ ERROR static of uninhabited type
7 //~| WARN: previously accepted
8 static NEVER: !; //~ ERROR static of uninhabited type
9 //~| WARN: previously accepted
12 static VOID2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
13 //~| WARN: previously accepted
14 //~| ERROR could not evaluate static initializer
15 //~| WARN: type `Void` does not permit zero-initialization
16 static NEVER2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
17 //~| WARN: previously accepted
18 //~| ERROR could not evaluate static initializer
19 //~| WARN: type `Void` does not permit zero-initialization