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

15 lines
231 B
Rust
Raw Normal View History

// error-pattern:Unsatisfied precondition
fn foo() -> int {
2011-07-27 07:19:39 -05:00
let x: int;
let i: int;
2011-07-27 07:19:39 -05:00
do { i = 0; break; x = 0; } while x != 0
log_full(core::debug, x);
2011-07-27 07:19:39 -05:00
ret 17;
}
fn main() { log_full(core::debug, foo()); }