Skip to content

Commit ee00666

Browse files
authored
Merge pull request #1158 from pushkine/patch-6
Update patterns allowed in @ patterns
2 parents 411c2f0 + 037fda0 commit ee00666

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/patterns.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ for i in -2..5 {
174174

175175
> **<sup>Syntax</sup>**\
176176
> _IdentifierPattern_ :\
177-
> &nbsp;&nbsp; &nbsp;&nbsp; `ref`<sup>?</sup> `mut`<sup>?</sup> [IDENTIFIER] (`@` [_Pattern_] ) <sup>?</sup>
177+
> &nbsp;&nbsp; &nbsp;&nbsp; `ref`<sup>?</sup> `mut`<sup>?</sup> [IDENTIFIER] (`@` [_PatternNoTopAlt_] ) <sup>?</sup>
178178
179179
Identifier patterns bind the value they match to a variable. The identifier
180180
must be unique within the pattern. The variable will shadow any variables of
@@ -852,6 +852,7 @@ result in a type mismatch between `x` in the different subpatterns.
852852
[_PathExpression_]: expressions/path-expr.md
853853
[_PathPattern_]: #path-patterns
854854
[_Pattern_]: #patterns
855+
[_PatternNoTopAlt_]: #patterns
855856
[_PatternWithoutRange_]: #patterns
856857
[_QualifiedPathInExpression_]: paths.md#qualified-paths
857858
[_RangePattern_]: #range-patterns

0 commit comments

Comments
 (0)