Closed
Description
All of the following programs (edit: not the second) produce 'Assertion pats.is_not_empty() failed', src/rustc/middle/check_alt.rs:80
This one should give a nonexhaustive error:
fn main() {
alt () { }
}
This one should compile and crash at runtime:
enum bottom { }
fn main() {
let x = ptr::addr_of(()) as *bottom;
alt unsafe { *x } { }
}
and I don't have the slightest idea what this one should do:
enum bottom { }
fn main() {
let x = ptr::addr_of(()) as *bottom;
alt x { }
}
Probably related #3037. The code in that bug compiles but it seems like the only zero-arm alt that can compile.