Closed
Description
The current Rust alpha allows one to attach two lifetimes with the same name to two distinct loop blocks.
This is a backwards compatibility risk for hypothesized future versions of Rust where the lifetime labels can be used in e.g. type annotations (rather than solely used for labelled break/continue statements).
Example:
fn main() {
let d = 3;
'a: for i in (0..d).rev() {
println!("i: {}", i);
}
'a: for i in (d..d*2).rev() {
println!("i: {}", i);
}
}