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
|
|
|
|
}
|
2021-01-20 22:03:29 -06:00
|
|
|
c: for _ in 0..1 { //~ ERROR malformed loop label
|
2021-01-20 19:50:21 -06:00
|
|
|
break 'c;
|
|
|
|
}
|
2021-01-20 22:03:29 -06:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|