|
2 | 2 |
|
3 | 3 | > **<sup>Syntax</sup>**\ |
4 | 4 | > _Pattern_ :\ |
| 5 | +> _PatternWithoutRange_\ |
| 6 | +> | [_RangePattern_] |
| 7 | +> |
| 8 | +> _PatternWithoutRange_ :\ |
5 | 9 | > [_LiteralPattern_]\ |
6 | 10 | > | [_IdentifierPattern_]\ |
7 | 11 | > | [_WildcardPattern_]\ |
8 | 12 | > | [_RestPattern_]\ |
9 | | -> | [_RangePattern_]\ |
| 13 | +> | [_ObsoleteRangePattern_]\ |
10 | 14 | > | [_ReferencePattern_]\ |
11 | 15 | > | [_StructPattern_]\ |
12 | 16 | > | [_TupleStructPattern_]\ |
@@ -378,8 +382,10 @@ match tuple { |
378 | 382 |
|
379 | 383 | > **<sup>Syntax</sup>**\ |
380 | 384 | > _RangePattern_ :\ |
381 | | -> _RangePatternBound_ `..=` _RangePatternBound_\ |
382 | | -> | _RangePatternBound_ `...` _RangePatternBound_ |
| 385 | +> _RangePatternBound_ `..=` _RangePatternBound_ |
| 386 | +> |
| 387 | +> _ObsoleteRangePattern_ :\ |
| 388 | +> _RangePatternBound_ `...` _RangePatternBound_ |
383 | 389 | > |
384 | 390 | > _RangePatternBound_ :\ |
385 | 391 | > [CHAR_LITERAL]\ |
@@ -486,7 +492,7 @@ ranges containing all Unicode Scalar Values: `'\u{0000}'..='\u{D7FF}'` and |
486 | 492 |
|
487 | 493 | > **<sup>Syntax</sup>**\ |
488 | 494 | > _ReferencePattern_ :\ |
489 | | -> (`&`|`&&`) `mut`<sup>?</sup> _Pattern_ |
| 495 | +> (`&`|`&&`) `mut`<sup>?</sup> [_PatternWithoutRange_] |
490 | 496 |
|
491 | 497 | Reference patterns dereference the pointers that are being matched |
492 | 498 | and, thus, borrow them. |
@@ -725,9 +731,11 @@ refer to refutable constants or enum variants for enums with multiple variants. |
725 | 731 | [_IdentifierPattern_]: #identifier-patterns |
726 | 732 | [_LiteralPattern_]: #literal-patterns |
727 | 733 | [_MacroInvocation_]: macros.md#macro-invocation |
| 734 | +[_ObsoleteRangePattern_]: #range-patterns |
728 | 735 | [_PathInExpression_]: paths.md#paths-in-expressions |
729 | 736 | [_PathPattern_]: #path-patterns |
730 | 737 | [_Pattern_]: #patterns |
| 738 | +[_PatternWithoutRange_]: #patterns |
731 | 739 | [_QualifiedPathInExpression_]: paths.md#qualified-paths |
732 | 740 | [_RangePattern_]: #range-patterns |
733 | 741 | [_ReferencePattern_]: #reference-patterns |
|
0 commit comments