Skip to content

Commit 741369c

Browse files
committed
Add note about _ObsoleteRangePattern_ being edition-specific.
1 parent 6124716 commit 741369c

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
@@ -483,7 +483,7 @@ r[patterns.range.syntax]
483483
>    | _RangeFromPattern_\
484484
>    | _RangeToExclusivePattern_\
485485
>    | _RangeToInclusivePattern_\
486-
>    | _ObsoleteRangePattern_
486+
>    | _ObsoleteRangePattern_[^obsolete-range-edition]
487487
>
488488
> _RangeExclusivePattern_ :\
489489
>       _RangePatternBound_ `..` _RangePatternBound_
@@ -509,6 +509,8 @@ r[patterns.range.syntax]
509509
> &nbsp;&nbsp; | `-`<sup>?</sup> [INTEGER_LITERAL]\
510510
> &nbsp;&nbsp; | `-`<sup>?</sup> [FLOAT_LITERAL]\
511511
> &nbsp;&nbsp; | [_PathExpression_]
512+
>
513+
> [^obsolete-range-edition]: The _ObsoleteRangePattern_ syntax has been removed in the 2021 edition.
512514
513515
r[patterns.range.intro]
514516
*Range patterns* match scalar values within the range defined by their bounds.

0 commit comments

Comments
 (0)