Skip to content

Commit 60f2ae8

Browse files
committed
Add a footnote to the "Range patterns" grammar saying when ObsoleteRangePattern is allowed
1 parent b83fcc1 commit 60f2ae8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/patterns.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ match tuple {
408408
> _RangePattern_ :\
409409
>       _InclusiveRangePattern_\
410410
>    | _HalfOpenRangePattern_\
411-
>    | _ObsoleteRangePattern_
411+
>    | _ObsoleteRangePattern_[^obsolete-range-edition]
412412
>
413413
> _InclusiveRangePattern_ :\
414414
>       _RangePatternBound_ `..=` _RangePatternBound_
@@ -426,6 +426,8 @@ match tuple {
426426
> &nbsp;&nbsp; | `-`<sup>?</sup> [FLOAT_LITERAL]\
427427
> &nbsp;&nbsp; | [_PathInExpression_]\
428428
> &nbsp;&nbsp; | [_QualifiedPathInExpression_]
429+
>
430+
> [^obsolete-range-edition]: Beginning with the 2021 edition, _ObsoleteRangePattern_ is not allowed.
429431
430432
Range patterns match values within the range defined by their bounds. A range pattern may be
431433
closed or half-open. A range pattern is closed if it has both a lower and an upper bound, and

0 commit comments

Comments
 (0)