mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
17 lines
381 B
Rust
17 lines
381 B
Rust
#![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
|
|
}
|
|
}
|