File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -123,26 +123,7 @@ while let Some(v @ 1) | Some(v @ 2) = vals.pop() {
123123}
124124```
125125
126- The expression cannot be a [ lazy boolean operator expression] [ _LazyBooleanOperatorExpression_ ] .
127- Use of a lazy boolean operator is ambiguous with a planned feature change
128- of the language (the implementation of if-let chains - see [ eRFC 2947] [ _eRFCIfLetChain_ ] ).
129- When lazy boolean operator expression is desired, this can be achieved
130- by using parenthesis as below:
131-
132- <!-- ignore: psuedo code -->
133- ``` rust,ignore
134- // Before...
135- while let PAT = EXPR && EXPR { .. }
136-
137- // After...
138- while let PAT = ( EXPR && EXPR ) { .. }
139-
140- // Before...
141- while let PAT = EXPR || EXPR { .. }
142-
143- // After...
144- while let PAT = ( EXPR || EXPR ) { .. }
145- ```
126+ As is the case in [ ` if let ` expressions] , the scrutinee cannot be a [ lazy boolean operator expression] [ _LazyBooleanOperatorExpression_ ] .
146127
147128## Iterator loops
148129
@@ -315,3 +296,5 @@ expression `()`.
315296[ `match` expression ] : match-expr.md
316297[ scrutinee ] : ../glossary.md#scrutinee
317298[ temporary values ] : ../expressions.md#temporary-lifetimes
299+ [ _LazyBooleanOperatorExpression_ ] : operator-expr.md#lazy-boolean-operators
300+ [ `if let` expressions ] : if-expr.md#if-let-expressions
You can’t perform that action at this time.
0 commit comments