summaryrefslogtreecommitdiffstats
path: root/tests/ui/for-loop-while/liveness-loop-break.rs
blob: 60a63bccb106896d12326e127e9fae3a9c0f0f17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
fn test() {
    let v;
    loop {
        v = 3;
        break;
    }
    println!("{}", v);
}

pub fn main() {
    test();
}