Named breaks in for loops in Rust
Yes. It uses the same syntax as lifetimes. fn main() { ‘outer: for x in 0..5 { ‘inner: for y in 0..5 { println!(“{},{}”, x, y); if y == 3 { break ‘outer; } } } } See loop labels documentation and the related section of the reference.