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

fn main() { f(); }