2012-03-11 20:17:27 -07:00
|
|
|
/* Make sure a loop{} with a break in it can't be
|
|
|
|
the tailexpr in the body of a diverging function */
|
|
|
|
fn forever() -> ! {
|
|
|
|
loop {
|
|
|
|
break;
|
|
|
|
}
|
2012-04-06 06:58:41 -07:00
|
|
|
ret 42; //! ERROR expected `_|_` but found `int`
|
2012-03-11 20:17:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
if (1 == 2) { forever(); }
|
|
|
|
}
|