Added chapter 8

This commit is contained in:
2020-06-11 18:01:30 -04:00
parent 1e76dc4a17
commit 933ff6d190
18 changed files with 525 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
#[allow(unreachable_code)]
#[allow(unused_labels)]
pub fn main(){
'outer: loop{
println!("Entered the outer loop");
'inner: loop{
println!("Entered the inner loop");
//This would break only the inner loop break;
//This breaks the outer loop
break 'outer;
}
println!("This point will never be reached");
}
println!("Exited the outer loop");
}