rust/src/test/compile-fail/while-bypass.rs

14 lines
137 B
Rust
Raw Normal View History

2010-06-23 21:03:09 -07:00
// error-pattern: precondition constraint
fn f() -> int {
let int x;
while(true) {
x = 10;
}
ret x;
}
fn main() {
f();
}