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

    loop {
        break;
        x = 0;
    }

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

    return 17;
}

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