rust/src/test/compile-fail/break-uninit2.rs

15 lines
193 B
Rust
Raw Normal View History

// error-pattern:Unsatisfied precondition
fn foo() -> int {
2011-07-27 14:19:39 +02:00
let x: int;
let i: int;
2011-07-27 14:19:39 +02:00
do { i = 0; break; x = 0; } while 1 != 2
2011-07-27 14:19:39 +02:00
log x;
2011-07-27 14:19:39 +02:00
ret 17;
}
fn main() { log foo(); }