Skip to content

Commit 1595109

Browse files
committed
Default binding modes do not apply for destructuring assignment
1 parent 7120df9 commit 1595109

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

text/0000-destructuring-assignment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ destructured using `..`.
155155
Patterns must be irrefutable. In particular, only slice patterns whose length is known at compile-
156156
time, and the trivial slice `[..]` may be used for destructuring assignment.
157157

158-
As expected from the desugaring, the default binding modes of normal `let` destructuring applying.
158+
Unlike in usual `let` bindings, default binding modes do *not* apply for the desugared destructuring
159+
assignments, as this leads to counterintuitive behaviour since the desguaring is an implementation
160+
detail.
159161

160162
## Diagnostics
161163

0 commit comments

Comments
 (0)