Closed
Description
This code
#![warn(unused_labels)]
fn main() {
'_unused: loop {
println!("hello world");
break;
}
}
yields this message
warning: unused label
--> src/main.rs:4:5
|
4 | '_unused: loop {
| ^^^^^^^^
|
note: lint level defined here
--> src/main.rs:1:9
|
1 | #![warn(unused_labels)]
| ^^^^^^^^^^^^^
I think this is not intended behavior: labels beginning with _
should be ignored by this lint, just as identifiers beginning with _
are ignored by similar lints in other contexts.
Right now I think this blocks Issue #66325, since we wouldn't want to start warn-by-default until it is fixed.