rust/src/test/compile-fail/while-bypass.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

6 lines
125 B
Rust

// error-pattern: precondition constraint
fn f() -> int { let x: int; while 1 == 1 { x = 10; } ret x; }
fn main() { f(); }