Skip to content

Commit

Permalink
Specify loop label format. Fixes #3105.
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Apr 21, 2022
1 parent 875f62c commit 6815f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ch03-05-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ next iteration.
If you have loops within loops, `break` and `continue` apply to the innermost
loop at that point. You can optionally specify a *loop label* on a loop that we
can then use with `break` or `continue` to specify that those keywords apply to
the labeled loop instead of the innermost loop. Here’s an example with two
nested loops:
the labeled loop instead of the innermost loop. Loop labels must begin with a
single quote. Here’s an example with two nested loops:

```rust
{{#rustdoc_include ../listings/ch03-common-programming-concepts/no-listing-32-5-loop-labels/src/main.rs}}
Expand Down

0 comments on commit 6815f64

Please sign in to comment.