Skip to content

Commit

Permalink
Add a footnote to the "Range patterns" grammar saying when ObsoleteRa…
Browse files Browse the repository at this point in the history
…ngePattern is allowed
  • Loading branch information
mattheww committed Dec 10, 2021
1 parent b83fcc1 commit 60f2ae8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ match tuple {
> _RangePattern_ :\
>       _InclusiveRangePattern_\
>    | _HalfOpenRangePattern_\
>    | _ObsoleteRangePattern_
>    | _ObsoleteRangePattern_[^obsolete-range-edition]
>
> _InclusiveRangePattern_ :\
>       _RangePatternBound_ `..=` _RangePatternBound_
Expand All @@ -426,6 +426,8 @@ match tuple {
> &nbsp;&nbsp; | `-`<sup>?</sup> [FLOAT_LITERAL]\
> &nbsp;&nbsp; | [_PathInExpression_]\
> &nbsp;&nbsp; | [_QualifiedPathInExpression_]
>
> [^obsolete-range-edition]: Beginning with the 2021 edition, _ObsoleteRangePattern_ is not allowed.
Range patterns match values within the range defined by their bounds. A range pattern may be
closed or half-open. A range pattern is closed if it has both a lower and an upper bound, and
Expand Down

0 comments on commit 60f2ae8

Please sign in to comment.