summary refs log tree commit diff
path: root/src/test/compile-fail/use-uninit-3.rs
blob: 2a6522ab40729c835d5a3316ce0fd687576e0e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// error-pattern:unsatisfied precondition

fn foo(x: int) { log(debug, x); }

fn main() {
    let x: int;
    if 1 > 2 {
        #debug("whoops");
    } else {
        x = 10;
    }
    foo(x);
}