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

6 lines
125 B
Rust
Raw Normal View History

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