Skip to content

Commit 7f7af5f

Browse files
committed
Merge pull request #3605 from dbp/tutorial
tutorial: changing `again` to `loop`
2 parents e8fe718 + 55ab043 commit 7f7af5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ literals and most enum variants.
616616

617617
`while` produces a loop that runs as long as its given condition
618618
(which must have type `bool`) evaluates to true. Inside a loop, the
619-
keyword `break` can be used to abort the loop, and `again` can be used
619+
keyword `break` can be used to abort the loop, and `loop` can be used
620620
to abort the current iteration and continue with the next.
621621

622622
~~~~
@@ -1564,7 +1564,7 @@ Empty argument lists can be omitted from `do` expressions.
15641564
15651565
Most iteration in Rust is done with `for` loops. Like `do`,
15661566
`for` is a nice syntax for doing control flow with closures.
1567-
Additionally, within a `for` loop, `break`, `again`, and `return`
1567+
Additionally, within a `for` loop, `break`, `loop`, and `return`
15681568
work just as they do with `while` and `loop`.
15691569
15701570
Consider again our `each` function, this time improved to
@@ -1599,7 +1599,7 @@ With `for`, functions like `each` can be treated more
15991599
like builtin looping structures. When calling `each`
16001600
in a `for` loop, instead of returning `false` to break
16011601
out of the loop, you just write `break`. To skip ahead
1602-
to the next iteration, write `again`.
1602+
to the next iteration, write `loop`.
16031603
16041604
~~~~
16051605
# use each = vec::each;

0 commit comments

Comments
 (0)