Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(minor) Remove Expression Path sub-types splits in Pattern specs #1138

Merged
merged 2 commits into from
Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ match tuple {
>    | [BYTE_LITERAL]\
> &nbsp;&nbsp; | `-`<sup>?</sup> [INTEGER_LITERAL]\
> &nbsp;&nbsp; | `-`<sup>?</sup> [FLOAT_LITERAL]\
> &nbsp;&nbsp; | [_PathInExpression_]\
> &nbsp;&nbsp; | [_QualifiedPathInExpression_]
> &nbsp;&nbsp; | [_PathPattern_]

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 Expand Up @@ -766,8 +765,7 @@ A future version of Rust may give the non-parenthesized version an alternate mea

> **<sup>Syntax</sup>**\
> _PathPattern_ :\
> &nbsp;&nbsp; &nbsp;&nbsp; [_PathInExpression_]\
> &nbsp;&nbsp; | [_QualifiedPathInExpression_]
> &nbsp;&nbsp; &nbsp;&nbsp; [_PathExpression_]

_Path patterns_ are patterns that refer either to constant values or
to structs or enum variants that have no fields.
Expand Down Expand Up @@ -851,6 +849,7 @@ result in a type mismatch between `x` in the different subpatterns.
[_MacroInvocation_]: macros.md#macro-invocation
[_ObsoleteRangePattern_]: #range-patterns
[_PathInExpression_]: paths.md#paths-in-expressions
[_PathExpression_]: expressions/path-expr.md
[_PathPattern_]: #path-patterns
[_Pattern_]: #patterns
[_PatternWithoutRange_]: #patterns
Expand Down