Skip to content

Commit 952745b

Browse files
committed
let-else, mention macro expansions
Forgot this in the last commit. Invisible groupings from macros should be allowed but should be shown to humans in visible expansion tools.
1 parent b6b87d6 commit 952745b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

text/0000-let-else.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ disallowed for programmer clarity so as to avoid `... else {} else {}` situation
217217
Boolean matches are not useful with let-else and so lazy boolean expressions are disallowed for reasons noted in [future-possibilities][].
218218
These types of expressions can still be used when combined in a less ambiguous manner with parenthesis,
219219
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
221+
around the expression output in this position if it ends in a `}` where possible (or otherwise show the invisible grouping).
220222

221223
Any refutable pattern that could be put into if-let's pattern position can be put into let-else's pattern position.
222224

0 commit comments

Comments
 (0)