Expressions and starting flow control in RBE
This commit is contained in:
18
rustbyexample/flow_control.d/loop.d/nested.rs
Normal file
18
rustbyexample/flow_control.d/loop.d/nested.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
#![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");
|
||||
}
|
Reference in New Issue
Block a user