summary refs log tree commit diff
path: root/src/test/compile-fail/liveness-while.rs
blob: cfa555b1e352e165f81cd08593f16db12c86b6fd (plain)
1
2
3
4
5
6
7
fn f() -> int {
    let mut x: int;
    while 1 == 1 { x = 10; }
    return x; //~ ERROR use of possibly uninitialized variable: `x`
}

fn main() { f(); }