We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 165c11a commit 9f758acCopy full SHA for 9f758ac
src/expressions/if-expr.md
@@ -114,6 +114,22 @@ match EXPR {
114
The expression cannot be a [lazy boolean operator expression][_LazyBooleanOperatorExpression_].
115
Use of a lazy boolean operator is ambiguous with a planned feature change
116
of the language (the implementation of if-let chains - see [eRFC 2947][_eRFCIfLetChain_]).
117
+When lazy boolean operator expression is desired, this can be achieved
118
+by using parenthesis as below:
119
+
120
+```rust,ignore
121
+// Before...
122
+if let PAT = EXPR && EXPR { .. }
123
124
+// After...
125
+if let PAT = ( EXPR && EXPR ) { .. }
126
127
128
+if let PAT = EXPR || EXPR { .. }
129
130
131
+if let PAT = ( EXPR || EXPR ) { .. }
132
+```
133
134
[_Expression_]: expressions.html
135
[_BlockExpression_]: expressions/block-expr.html
0 commit comments