rust/src/test/compile-fail/use-uninit-3.rs

14 lines
196 B
Rust
Raw Normal View History

// error-pattern:Unsatisfied precondition
2010-07-08 07:33:25 -07:00
fn foo(x: int) { log(debug, x); }
2010-07-08 07:33:25 -07:00
fn main() {
let x: int;
if 1 > 2 {
#debug("whoops");
} else {
x = 10;
}
foo(x);
}