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

fn main() { f(); }