summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-while.rs
blob: f49a778eb6bbeb38c3ff8fc496e4dbaa961d4b79 (plain)
1
2
3
4
5
6
7
fn f() -> isize {
    let mut x: isize;
    while 1 == 1 { x = 10; }
    return x; //~ ERROR E0381
}

fn main() { f(); }