3d738e9e06
This ensures we don't get compile errors on unreachable code (see test/run-pass/artificial-block.rs for an example of sane code that wasn't compiling). In the future, we might want to warn about non-trivial code appearing in an unreachable context, and/or avoid generating unreachable code altogether (though I'm sure LLVM will weed it out as well).
11 lines
88 B
Rust
11 lines
88 B
Rust
// xfail-stage0
|
|
fn f() -> int {
|
|
{ ret 3; }
|
|
}
|
|
|
|
fn main() {
|
|
assert(f() == 3);
|
|
}
|
|
|
|
|