Skip to content

Commit c6049ba

Browse files
committed
Cover enums in the refutability rule for tuple struct patterns
1 parent eada9ba commit c6049ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ A struct pattern is refutable if the _PathInExpression_ resolves to a constructo
688688
Tuple struct patterns match tuple struct and enum values that match all criteria defined by its subpatterns.
689689
They are also used to [destructure](#destructuring) a tuple struct or enum value.
690690

691-
A tuple struct pattern is refutable when one of its subpatterns is refutable.
691+
A tuple struct pattern is refutable if the _PathInExpression_ resolves to a constructor of an enum with more than one variant, or one of its subpatterns is refutable.
692692

693693
## Tuple patterns
694694

0 commit comments

Comments
 (0)