Skip to content

Commit 4033b60

Browse files
committed
Add identifier refutability.
1 parent c0343a7 commit 4033b60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/patterns.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ copying or moving what was matched.
249249
[Path patterns](#path-patterns) take precedence over identifier patterns. It is an error
250250
if `ref` or `ref mut` is specified and the identifier shadows a constant.
251251

252+
Identifier patterns are irrefutable if the `@` subpattern is irrefutable or
253+
the subpattern is not specified.
254+
252255
### Binding modes
253256

254257
To service better ergonomics, patterns operate in different *binding modes* in
@@ -638,7 +641,7 @@ They are also used to [destructure](#destructuring) a tuple.
638641
The form `(..)` with a single [_RestPattern_] is a special form that does not
639642
require a comma, and matches a tuple of any size.
640643

641-
This pattern is refutable when one of its subpatterns is refutable.
644+
The tuple pattern is refutable when one of its subpatterns is refutable.
642645

643646
## Grouped patterns
644647

0 commit comments

Comments
 (0)