@@ -600,7 +600,7 @@ Rust supports three loop expressions:
600
600
601
601
All three types of loop support [ ` break ` expressions] ( #break-expressions ) ,
602
602
[ ` continue ` expressions] ( #continue-expressions ) , and [ labels] ( #loop-labels ) .
603
- Only ` loop ` supports [ break-with-value ] ( #break-with-value ) .
603
+ Only ` loop ` supports [ evaluation to non-trivial values ] ( #break-and-loop-values ) .
604
604
605
605
### Infinite loops
606
606
@@ -699,7 +699,7 @@ be used to specify which enclosing loop is affected. Example:
699
699
```
700
700
701
701
A ` break ` expression is only permitted in the body of a loop, and has one of
702
- the forms ` break ` , ` break 'label ` or (see [ break-with-value ] ( #break-with-value ) )
702
+ the forms ` break ` , ` break 'label ` or ([ see below ] ( #break-and-loop-values ) )
703
703
` break EXPR ` or ` break 'label EXPR ` .
704
704
705
705
### ` continue ` expressions
@@ -714,14 +714,13 @@ Like `break`, `continue` is normally associated with the innermost enclosing
714
714
loop, but ` continue 'label ` may be used to specify the loop affected.
715
715
A ` continue ` expression is only permitted in the body of a loop.
716
716
717
- ### Break-with-value
717
+ ### ` break ` and loop values
718
718
719
719
When associated with a ` loop ` , a break expression may be used to return a value
720
720
from that loop, via one of the forms ` break EXPR ` or ` break 'label EXPR ` , where
721
721
` EXPR ` is an expression whose result is returned from the ` loop ` . For example:
722
722
723
723
``` rust
724
- #![feature(loop_break_value)]
725
724
let (mut a , mut b ) = (1 , 1 );
726
725
let result = loop {
727
726
if b > 10 {
0 commit comments