summaryrefslogtreecommitdiffstats
path: root/tests/ui/label/label_misspelled_2.rs
blob: 55bbe6b30a5930382dbd75afac17550f22749d44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![warn(unused_labels)]

fn main() {
    'a: for _ in 0..1 {
        break 'a;
    }
    'b: for _ in 0..1 {
        break b; //~ ERROR cannot find value `b` in this scope
    }
    c: for _ in 0..1 { //~ ERROR malformed loop label
        break 'c;
    }
    d: for _ in 0..1 { //~ ERROR malformed loop label
        break d; //~ ERROR cannot find value `d` in this scope
    }
}