Closed
Description
The following code:
fn main() {
'a: loop {break;}
'a: loop {break;}
}
generates the following warning:
warning: label name `'a` shadows a label name that is already in scope
--> file_name.rs:3:5
|
2 | 'a: loop {break;}
| -- first declared here
3 | 'a: loop {break;}
| ^^ lifetime 'a already in scope
As it is impossible to meaningfully use (as in break 'a
) the 'a
of the first loop from the second loop, the warning seems rather redundant.