blob: cc78f6cfa53f7127282038e0aaf1990424e8812f [file] [log] [blame]
#![feature(never_type)]
#![deny(uninhabited_static)]
enum Void {}
extern {
static VOID: Void; //~ ERROR static of uninhabited type
//~| WARN: previously accepted
static NEVER: !; //~ ERROR static of uninhabited type
//~| WARN: previously accepted
}
static VOID2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
//~| WARN: previously accepted
static NEVER2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
//~| WARN: previously accepted
fn main() {}