rust/tests/ui/label/label_misspelled_2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
381 B
Rust
Raw Normal View History

2021-01-20 19:50:21 -06:00
#![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
2021-01-20 19:50:21 -06:00
break 'c;
}
d: for _ in 0..1 { //~ ERROR malformed loop label
break d; //~ ERROR cannot find value `d` in this scope
2021-01-20 19:50:21 -06:00
}
}