Skip to content

Commit

Permalink
Merge pull request #1010 from ehuss/revert-pat-param
Browse files Browse the repository at this point in the history
Revert "Temporarily remove pat_param."
  • Loading branch information
matthewjasper authored May 28, 2021
2 parents 9c68af3 + 3a6ddea commit af90bd4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/macros-by-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>
> _MacroFragSpec_ :\
>       `block` | `expr` | `ident` | `item` | `lifetime` | `literal`\
>    | `meta` | `pat` | `path` | `stmt` | `tt` | `ty` | `vis`
>    | `meta` | `pat` | `pat_param` | `path` | `stmt` | `tt` | `ty` | `vis`
>
> _MacroRepSep_ :\
> &nbsp;&nbsp; [_Token_]<sub>_except delimiters and repetition operators_</sub>
Expand Down Expand Up @@ -122,7 +122,8 @@ fragment specifiers are:
* `block`: a [_BlockExpression_]
* `stmt`: a [_Statement_] without the trailing semicolon (except for item
statements that require semicolons)
* `pat`: a [_PatternNoTopAlt_]
* `pat_param`: a [_PatternNoTopAlt_]
* `pat`: equivalent to `pat_param`
* `expr`: an [_Expression_]
* `ty`: a [_Type_]
* `ident`: an [IDENTIFIER_OR_KEYWORD]
Expand Down Expand Up @@ -450,7 +451,7 @@ Matchers like `$i:expr,` or `$i:expr;` would be legal, however, because `,` and
`;` are legal expression separators. The specific rules are:

* `expr` and `stmt` may only be followed by one of: `=>`, `,`, or `;`.
* `pat` may only be followed by one of: `=>`, `,`, `=`, `|`, `if`, or `in`.
* `pat` and `pat_param` may only be followed by one of: `=>`, `,`, `=`, `|`, `if`, or `in`.
* `path` and `ty` may only be followed by one of: `=>`, `,`, `=`, `|`, `;`,
`:`, `>`, `>>`, `[`, `{`, `as`, `where`, or a macro variable of `block`
fragment specifier.
Expand Down

0 comments on commit af90bd4

Please sign in to comment.