Skip to content

Commit 062bec9

Browse files
author
Alexander Linne
committed
Fix grammer for tuple patterns and tuple struct patterns
1 parent 3ce94ca commit 062bec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/patterns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ A struct pattern is refutable when one of its subpatterns is refutable.
560560
>
561561
> _TupleStructItems_ :\
562562
> &nbsp;&nbsp; &nbsp;&nbsp; [_Pattern_]&nbsp;( `,` [_Pattern_] )<sup>\*</sup> `,`<sup>?</sup>\
563-
> &nbsp;&nbsp; | ([_Pattern_] `,`)<sup>\*</sup> `..` ( (`,` [_Pattern_])<sup>+</sup> `,`<sup>?</sup> )<sup>?</sup>
563+
> &nbsp;&nbsp; | ([_Pattern_] `,`)<sup>\*</sup> `..` (`,` [_Pattern_])<sup>*</sup> `,`<sup>?</sup>
564564
565565
Tuple struct patterns match tuple struct and enum values that match all criteria defined
566566
by its subpatterns. They are also used to [destructure](#destructuring) a tuple struct or
@@ -577,7 +577,7 @@ A tuple struct pattern is refutable when one of its subpatterns is refutable.
577577
> _TuplePatternItems_ :\
578578
> &nbsp;&nbsp; &nbsp;&nbsp; [_Pattern_] `,`\
579579
> &nbsp;&nbsp; | [_Pattern_]&nbsp;(`,` [_Pattern_])<sup>+</sup> `,`<sup>?</sup>\
580-
> &nbsp;&nbsp; | ([_Pattern_] `,`)<sup>\*</sup> `..` ( (`,` [_Pattern_])<sup>+</sup> `,`<sup>?</sup> )<sup>?</sup>
580+
> &nbsp;&nbsp; | ([_Pattern_] `,`)<sup>\*</sup> `..` (`,` [_Pattern_])<sup>*</sup> `,`<sup>?</sup>
581581
582582
Tuple patterns match tuple values that match all criteria defined by its subpatterns.
583583
They are also used to [destructure](#destructuring) a tuple.

0 commit comments

Comments
 (0)