Closed
Description
for example:
enum Void {}
// this uses middle::liveness reachability - the end of the
// function is not reachable
fn compiles() -> Void {
loop {
panic!();
break
};
}
// this uses typeck reachability - the end of the block
// is reachable, despite the code being identical.
fn does_not_compile() -> Void {
let a: Void = { //~ ERROR mismatched types
loop {
panic!();
break
};
};
a
}
fn main() {}
Metadata
Metadata
Assignees
Labels
No labels