Update Examples
parent
bcb9971083
commit
5a2bb177a3
30
Examples.md
30
Examples.md
@ -784,11 +784,41 @@ fn main
|
||||
<td>
|
||||
|
||||
```
|
||||
#![allow(unreachable_code, 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");
|
||||
}
|
||||
```
|
||||
</td><td>
|
||||
|
||||
```
|
||||
#![allow(unreachable_code, 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"
|
||||
|
||||
|
||||
|
||||
```
|
||||
</td></tr></table>
|
||||
|
Loading…
Reference in New Issue
Block a user