Skip to content

Commit d089485

Browse files
Sawyer47alexcrichton
authored andcommitted
---
yaml --- r: 113393 b: refs/heads/snap-stage3 c: 06ea989 h: refs/heads/master i: 113391: 4e855e6 v: v3
1 parent 2f25df1 commit d089485

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: abdacecdf86b4b5a4f432560445a24e1c5f4751b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 31de69d0dd816fc0447df2e19d8935f68484ed64
4+
refs/heads/snap-stage3: 06ea9893d58624e348cc0b4bcc3da0bda6c28327
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/doc/rust.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The keywords are the following strings:
208208
~~~~ {.notrust .keyword}
209209
as
210210
box break
211-
crate
211+
continue crate
212212
else enum extern
213213
false fn for
214214
if impl in
@@ -2924,18 +2924,16 @@ while i < 10 {
29242924

29252925
### Infinite loops
29262926

2927-
The keyword `loop` in Rust appears both in _loop expressions_ and in _continue expressions_.
2928-
A loop expression denotes an infinite loop;
2929-
see [Continue expressions](#continue-expressions) for continue expressions.
2927+
A `loop` expression denotes an infinite loop.
29302928

29312929
~~~~ {.notrust .ebnf .gram}
29322930
loop_expr : [ lifetime ':' ] "loop" '{' block '}';
29332931
~~~~
29342932

29352933
A `loop` expression may optionally have a _label_.
29362934
If a label is present,
2937-
then labeled `break` and `loop` expressions nested within this loop may exit out of this loop or return control to its head.
2938-
See [Break expressions](#break-expressions).
2935+
then labeled `break` and `continue` expressions nested within this loop may exit out of this loop or return control to its head.
2936+
See [Break expressions](#break-expressions) and [Continue expressions](#continue-expressions).
29392937

29402938
### Break expressions
29412939

@@ -2953,21 +2951,21 @@ but must enclose it.
29532951
### Continue expressions
29542952

29552953
~~~~ {.notrust .ebnf .gram}
2956-
continue_expr : "loop" [ lifetime ];
2954+
continue_expr : "continue" [ lifetime ];
29572955
~~~~
29582956

2959-
A continue expression, written `loop`, also has an optional `label`.
2957+
A `continue` expression has an optional `label`.
29602958
If the label is absent,
2961-
then executing a `loop` expression immediately terminates the current iteration of the innermost loop enclosing it,
2959+
then executing a `continue` expression immediately terminates the current iteration of the innermost loop enclosing it,
29622960
returning control to the loop *head*.
29632961
In the case of a `while` loop,
29642962
the head is the conditional expression controlling the loop.
29652963
In the case of a `for` loop, the head is the call-expression controlling the loop.
2966-
If the label is present, then `loop foo` returns control to the head of the loop with label `foo`,
2964+
If the label is present, then `continue foo` returns control to the head of the loop with label `foo`,
29672965
which need not be the innermost label enclosing the `break` expression,
29682966
but must enclose it.
29692967

2970-
A `loop` expression is only permitted in the body of a loop.
2968+
A `continue` expression is only permitted in the body of a loop.
29712969

29722970
### For expressions
29732971

0 commit comments

Comments
 (0)