box-o-sand/rustbyexample/flow_control.d/loop.d/nested.rs

19 lines
341 B
Rust
Raw Normal View History

#![allow(unreachable_code)]
#![allow(unused_labels)]
fn main() {
'outer: loop {
println!("Entered the outer loop");
'inner: loop {
println!("Entered the inner loop");
break 'outer;
}
println!("This point will never be reached");
}
println!("Exited the outer loop");
}