rust/src/test/run-pass/loop-diverges.rs

10 lines
156 B
Rust
Raw Normal View History

2012-03-11 22:17:27 -05:00
/* Make sure a loop{} can be the tailexpr in the body
of a diverging function */
fn forever() -> ! {
loop{}
}
fn main() {
if (1 == 2) { forever(); }
}