rust/src/test/compile-fail/while-bypass.rs
2010-06-23 21:03:09 -07:00

13 lines
137 B
Rust

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