summaryrefslogtreecommitdiffstats
path: root/src/test/ui/for-loop-while/labeled-break.rs
blob: 4dacc57574f1775c7227ea2fd16fdff5efe70d24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// run-pass
// pretty-expanded FIXME #23616

pub fn main() {
    'foo: loop {
        loop {
            break 'foo;
        }
    }

    'bar: for _ in 0..100 {
        loop {
            break 'bar;
        }
    }

    'foobar: while 1 + 1 == 2 {
        loop {
            break 'foobar;
        }
    }
}