Closed
Description
The following code causes a compiler error:
fn main() {
not(true);
}
fn not(b: bool) -> bool {
if b {
!b
} else {
fail!("Break the compiler");
if !b {
}
}
}
The error message:
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
task 'rustc' failed at 'assertion failed: dest == expr::Ignore || bcx.unreachable.get()', /home/nick/workspace/rust/src/librustc/middle/trans/controlflow.rs:91