rust/src/test/run-pass/loop-diverges.rs
2012-03-11 20:17:27 -07:00

10 lines
156 B
Rust

/* Make sure a loop{} can be the tailexpr in the body
of a diverging function */
fn forever() -> ! {
loop{}
}
fn main() {
if (1 == 2) { forever(); }
}