summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-break-uninit-2.rs
blob: 3abca33a84add3f9c4fe8a04df94ac8dbd9e997b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn foo() -> isize {
    let x: isize;

    while 1 != 2  {
        break;
        x = 0;
    }

    println!("{}", x); //~ ERROR E0381

    return 17;
}

fn main() { println!("{}", foo()); }