rust/tests/ui/suggestions/suggest-labels.rs

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

17 lines
345 B
Rust
Raw Normal View History

#[allow(unreachable_code, unused_labels)]
fn main() {
'foo: loop {
2017-11-20 12:13:27 +00:00
break 'fo; //~ ERROR use of undeclared label
}
'bar: loop {
2017-11-20 12:13:27 +00:00
continue 'bor; //~ ERROR use of undeclared label
}
'longlabel: loop {
'longlabel1: loop {
2017-11-20 12:13:27 +00:00
break 'longlable; //~ ERROR use of undeclared label
}
}
}