@@ -2762,7 +2762,7 @@ The following expressions are equivalent.
2762
2762
let x = std::ops::Range {start: 0, end: 10};
2763
2763
let y = 0..10;
2764
2764
2765
- assert_eq!(x,y);
2765
+ assert_eq!(x, y);
2766
2766
```
2767
2767
2768
2768
### Unary operator expressions
@@ -3035,18 +3035,18 @@ A `loop` expression may optionally have a _label_. The label is written as
3035
3035
a lifetime preceding the loop expression, as in ` 'foo: loop{ } ` . If a
3036
3036
label is present, then labeled ` break ` and ` continue ` expressions nested
3037
3037
within this loop may exit out of this loop or return control to its head.
3038
- See [ Break expressions] ( #break-expressions ) and [ Continue
3038
+ See [ break expressions] ( #break-expressions ) and [ continue
3039
3039
expressions] ( #continue-expressions ) .
3040
3040
3041
- ### Break expressions
3041
+ ### ` break ` expressions
3042
3042
3043
3043
A ` break ` expression has an optional _ label_ . If the label is absent, then
3044
3044
executing a ` break ` expression immediately terminates the innermost loop
3045
3045
enclosing it. It is only permitted in the body of a loop. If the label is
3046
3046
present, then ` break 'foo ` terminates the loop with label ` 'foo ` , which need not
3047
3047
be the innermost label enclosing the ` break ` expression, but must enclose it.
3048
3048
3049
- ### Continue expressions
3049
+ ### ` continue ` expressions
3050
3050
3051
3051
A ` continue ` expression has an optional _ label_ . If the label is absent, then
3052
3052
executing a ` continue ` expression immediately terminates the current iteration
@@ -3059,7 +3059,7 @@ innermost label enclosing the `break` expression, but must enclose it.
3059
3059
3060
3060
A ` continue ` expression is only permitted in the body of a loop.
3061
3061
3062
- ### While loops
3062
+ ### ` while ` loops
3063
3063
3064
3064
A ` while ` loop begins by evaluating the boolean loop conditional expression.
3065
3065
If the loop conditional expression evaluates to ` true ` , the loop body block
@@ -3082,12 +3082,12 @@ Like `loop` expressions, `while` loops can be controlled with `break` or
3082
3082
loops] ( #infinite-loops ) , [ break expressions] ( #break-expressions ) , and
3083
3083
[ continue expressions] ( #continue-expressions ) for more information.
3084
3084
3085
- ### For expressions
3085
+ ### ` for ` expressions
3086
3086
3087
3087
A ` for ` expression is a syntactic construct for looping over elements provided
3088
3088
by an implementation of ` std::iter::IntoIterator ` .
3089
3089
3090
- An example of a for loop over the contents of an array:
3090
+ An example of a ` for ` loop over the contents of an array:
3091
3091
3092
3092
```
3093
3093
# type Foo = i32;
@@ -3117,7 +3117,7 @@ Like `loop` expressions, `for` loops can be controlled with `break` or
3117
3117
loops] ( #infinite-loops ) , [ break expressions] ( #break-expressions ) , and
3118
3118
[ continue expressions] ( #continue-expressions ) for more information.
3119
3119
3120
- ### If expressions
3120
+ ### ` if ` expressions
3121
3121
3122
3122
An ` if ` expression is a conditional branch in program control. The form of an
3123
3123
` if ` expression is a condition expression, followed by a consequent block, any
@@ -3129,7 +3129,7 @@ evaluates to `false`, the consequent block is skipped and any subsequent `else
3129
3129
if` condition is evaluated. If all ` if` and ` else if` conditions evaluate to
3130
3130
` false ` then any ` else ` block is executed.
3131
3131
3132
- ### Match expressions
3132
+ ### ` match ` expressions
3133
3133
3134
3134
A ` match ` expression branches on a * pattern* . The exact form of matching that
3135
3135
occurs depends on the pattern. Patterns consist of some combination of
@@ -3235,7 +3235,7 @@ let message = match maybe_digit {
3235
3235
};
3236
3236
```
3237
3237
3238
- ### If let expressions
3238
+ ### ` if let` expressions
3239
3239
3240
3240
An ` if let ` expression is semantically identical to an ` if ` expression but in place
3241
3241
of a condition expression it expects a refutable let statement. If the value of the
@@ -3256,15 +3256,15 @@ if let ("Ham", b) = dish {
3256
3256
}
3257
3257
```
3258
3258
3259
- ### While let loops
3259
+ ### ` while let` loops
3260
3260
3261
3261
A ` while let ` loop is semantically identical to a ` while ` loop but in place of a
3262
3262
condition expression it expects a refutable let statement. If the value of the
3263
3263
expression on the right hand side of the let statement matches the pattern, the
3264
3264
loop body block executes and control returns to the pattern matching statement.
3265
3265
Otherwise, the while expression completes.
3266
3266
3267
- ### Return expressions
3267
+ ### ` return ` expressions
3268
3268
3269
3269
Return expressions are denoted with the keyword ` return ` . Evaluating a ` return `
3270
3270
expression moves its argument into the designated output location for the
0 commit comments