You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We follow American spellings in the Reference, but we had used the
Commonwealth spelling "labelled" rather than the American spelling
"labeled". Let's fix that and add the appropriate redirects.
Copy file name to clipboardExpand all lines: src/expressions/loop-expr.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,16 @@ Rust supports four loop expressions:
18
18
* A [`loop` expression](#infinite-loops) denotes an infinite loop.
19
19
* A [`while` expression](#predicate-loops) loops until a predicate is false.
20
20
* A [`for` expression](#iterator-loops) extracts values from an iterator, looping until the iterator is empty.
21
-
* A [labelled block expression](#labelled-block-expressions) runs a loop exactly once, but allows exiting the loop early with `break`.
21
+
* A [labeled block expression][expr.loop.block-labels] runs a loop exactly once, but allows exiting the loop early with `break`.
22
22
23
23
r[expr.loop.break-label]
24
24
All four types of loop support [`break` expressions](#break-expressions), and [labels](#loop-labels).
25
25
26
26
r[expr.loop.continue-label]
27
-
All except labelled block expressions support [`continue` expressions](#continue-expressions).
27
+
All except labeled block expressions support [`continue` expressions](#continue-expressions).
28
28
29
29
r[expr.loop.explicit-result]
30
-
Only `loop` and labelled block expressions support [evaluation to non-trivial values](#break-and-loop-values).
30
+
Only `loop` and labeled block expressions support [evaluation to non-trivial values](#break-and-loop-values).
31
31
32
32
r[expr.loop.infinite]
33
33
## Infinite loops
@@ -309,21 +309,21 @@ r[expr.loop.break.value]
309
309
A `break` expression is only permitted in the body of a loop, and has one of the forms `break`, `break 'label` or ([see below](#break-and-loop-values)) `break EXPR` or `break 'label EXPR`.
310
310
311
311
r[expr.loop.block-labels]
312
-
## Labelled block expressions
312
+
## Labeled block expressions
313
313
314
314
r[expr.loop.block-labels.syntax]
315
315
```grammar,expressions
316
316
LabelBlockExpression -> BlockExpression
317
317
```
318
318
319
319
r[expr.loop.block-labels.intro]
320
-
Labelled block expressions are exactly like block expressions, except that they allow using `break` expressions within the block.
320
+
Labeled block expressions are exactly like block expressions, except that they allow using `break` expressions within the block.
321
321
322
322
r[expr.loop.block-labels.break]
323
-
Unlike loops, `break` expressions within a labelled block expression *must* have a label (i.e. the label is not optional).
323
+
Unlike loops, `break` expressions within a labeled block expression *must* have a label (i.e. the label is not optional).
324
324
325
325
r[expr.loop.block-labels.label-required]
326
-
Similarly, labelled block expressions *must* begin with a label.
326
+
Similarly, labeled block expressions *must* begin with a label.
0 commit comments