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
Copy file name to clipboardExpand all lines: src/expressions/await-expr.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ future is ready to produce a value.
14
14
r[expr.await.construct]
15
15
The syntax for an await expression is an expression with a type that implements the [`IntoFuture`] trait, called the *future operand*, then the token `.`, and then the `await` keyword.
16
16
17
-
r[expr.await.constraints]
17
+
r[expr.await.allowed-positions]
18
18
Await expressions are legal only within an [async context], like an [`async fn`], [`async` closure], or [`async` block].
Copy file name to clipboardExpand all lines: src/expressions/if-expr.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ r[expr.if.intro]
16
16
An `if` expression is a conditional branch in program control.
17
17
The syntax of an `if` expression is a condition operand, followed by a consequent block, any number of `else if` conditions and blocks, and an optional trailing `else` block.
18
18
19
-
r[expr.if.constraint]
19
+
r[expr.if.condition-bool]
20
20
The condition operands must have the [boolean type].
21
21
22
22
r[expr.if.condition-true]
@@ -152,7 +152,7 @@ if let E::X(n) | E::Y(n) = v {
152
152
}
153
153
```
154
154
155
-
r[expr.if.let.restriction]
155
+
r[expr.if.let.lazy-bool]
156
156
The expression cannot be a [lazy boolean operator expression][_LazyBooleanOperatorExpression_].
157
157
Use of a lazy boolean operator is ambiguous with a planned feature change of the language (the implementation of if-let chains - see [eRFC 2947][_eRFCIfLetChain_]).
158
158
When lazy boolean operator expression is desired, this can be achieved by using parenthesis as below:
Copy file name to clipboardExpand all lines: src/expressions/operator-expr.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ r[expr.try.syntax]
196
196
r[expr.try.intro]
197
197
The question mark operator (`?`) unwraps valid values or returns erroneous values, propagating them to the calling function.
198
198
199
-
r[expr.try.constraint]
199
+
r[expr.try.restricted-types]
200
200
It is a unary postfix operator that can only be applied to the types `Result<T, E>` and `Option<T>`.
201
201
202
202
r[expr.try.behavior-std-result]
@@ -358,7 +358,7 @@ r[expr.cmp.syntax]
358
358
r[expr.cmp.intro]
359
359
Comparison operators are also defined both for primitive types and many types in the standard library.
360
360
361
-
r[expr.cmp.restriction]
361
+
r[expr.cmp.paren-chaining]
362
362
Parentheses are required when chaining comparison operators. For example, the expression `a == b == c` is invalid and may be written as `(a == b) == c`.
363
363
364
364
r[expr.cmp.trait]
@@ -736,12 +736,12 @@ let (mut a, mut b) = (0, 1);
736
736
(b, a) = (a, b);
737
737
```
738
738
739
-
r[expr.assign.destructure.restriction]
739
+
r[expr.assign.destructure.assignee]
740
740
In contrast to destructuring declarations using `let`, patterns may not appear on the left-hand side of an assignment due to syntactic ambiguities.
741
741
Instead, a group of expressions that correspond to patterns are designated to be [assignee expressions][assignee expression], and permitted on the left-hand side of an assignment.
742
742
Assignee expressions are then desugared to pattern matches followed by sequential assignment.
743
743
744
-
r[expr.assign.destructure.constraint]
744
+
r[expr.assign.destructure.irrefutable]
745
745
The desugared patterns must be irrefutable: in particular, this means that only slice patterns whose length is known at compile-time, and the trivial slice `[..]`, are permitted for destructuring assignment.
746
746
747
747
The desugaring method is straightforward, and is illustrated best by example.
@@ -818,7 +818,7 @@ The syntax of compound assignment is a [mutable] [place expression], the *assign
818
818
r[expr.compound-assign.place]
819
819
Unlike other place operands, the assigned place operand must be a place expression.
820
820
821
-
r[expr.compound-assign.constraint]
821
+
r[expr.compound-assign.no-value]
822
822
Attempting to use a value expression is a compiler error rather than promoting it to a temporary.
Copy file name to clipboardExpand all lines: src/expressions/struct-expr.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ r[expr.struct.update]
68
68
r[expr.struct.update.intro]
69
69
A struct expression that constructs a value of a struct type can terminate with the syntax `..` followed by an expression to denote a functional update.
70
70
71
-
r[expr.struct.update.constraint]
71
+
r[expr.struct.update.base-same-type]
72
72
The expression following `..` (the base) must have the same struct type as the new struct type being formed.
73
73
74
74
r[expr.struct.update.fields]
@@ -85,7 +85,7 @@ Point3d {y: 0, z: 10, .. base}; // OK, only base.x is accessed
85
85
drop(y_ref);
86
86
```
87
87
88
-
r[expr.struct.restriction]
88
+
r[expr.struct.brace-restricted-positions]
89
89
Struct expressions with curly braces can't be used directly in a [loop] or [if] expression's head, or in the [scrutinee] of an [if let] or [match] expression.
90
90
However, struct expressions can be used in these situations if they are within another expression, for example inside [parentheses].
0 commit comments