summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-labels.rs
blob: 159f45855ce77b42618dfc9f7fcdf3fcebce49b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[allow(unreachable_code, unused_labels)]
fn main() {
    'foo: loop {
        break 'fo; //~ ERROR use of undeclared label
    }

    'bar: loop {
        continue 'bor; //~ ERROR use of undeclared label
    }

    'longlabel: loop {
        'longlabel1: loop {
            break 'longlable; //~ ERROR use of undeclared label
        }
    }
}