File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -209,15 +209,15 @@ let (each, binding) = match expr {
209
209
```
210
210
211
211
Most expressions may be put into the expression position with two restrictions:
212
- 1 . May not end with a ` } ` (before macro expansion). (Such things must be put in parenthesis .)
212
+ 1 . May not end with a ` } ` (before macro expansion). (Such things must be put in parentheses .)
213
213
2 . May not be just a lazy boolean expression (` && ` or ` || ` ). (Must not be a [ ` LazyBooleanExpression ` ] [ lazy-boolean-operators ] .)
214
214
215
215
While allowing e.g. ` if {} else {} ` directly in the expression position is technically feasible this RFC proposes it be
216
216
disallowed for programmer clarity so as to avoid ` ... else {} else {} ` situations as discussed in the [ drawbacks] [ ] section.
217
217
Boolean matches are not useful with let-else and so lazy boolean expressions are disallowed for reasons noted in [ future-possibilities] [ ] .
218
- These types of expressions can still be used when combined in a less ambiguous manner with parenthesis ,
218
+ These types of expressions can still be used when combined in a less ambiguous manner with parentheses ,
219
219
which is allowed under the two expression restrictions.
220
- Invisible groupings from macros expansions are also allowed, however macro expansion representations to humans should include parenthesis
220
+ Invisible groupings from macros expansions are also allowed, however macro expansion representations to humans should include parentheses
221
221
around the expression output in this position if it ends in a ` } ` where possible (or otherwise show the invisible grouping).
222
222
223
223
Any refutable pattern that could be put into if-let's pattern position can be put into let-else's pattern position.
You can’t perform that action at this time.
0 commit comments