rust/src/test/compile-fail/while-loop-constraints.rs
Tim Chevalier 321fd80219 Add an infinite loop construct
Add a loop {} construct for infinite loops, and use it in test
cases. See #1906 for details.
2012-03-09 16:40:58 -08:00

15 lines
257 B
Rust

// error-pattern:unsatisfied precondition constraint (for example, init(y
fn main() {
let y: int = 42;
let x: int;
loop {
log(debug, y);
loop {
loop {
loop { x <- y; }
}
}
}
}