summary refs log tree commit diff
path: root/src/test/ui/borrowck/borrowck-while.rs
blob: 6b3220c7d8591970e90a89cc7b211a1fe5bb7dc9 (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(); }