|
28 | 28 | >
|
29 | 29 | > _MacroFragSpec_ :\
|
30 | 30 | > `block` | `expr` | `ident` | `item` | `lifetime` | `literal`\
|
31 |
| -> | `meta` | `pat` | `path` | `stmt` | `tt` | `ty` | `vis` |
| 31 | +> | `meta` | `pat` | `pat_param` | `path` | `stmt` | `tt` | `ty` | `vis` |
32 | 32 | >
|
33 | 33 | > _MacroRepSep_ :\
|
34 | 34 | > [_Token_]<sub>_except delimiters and repetition operators_</sub>
|
@@ -122,7 +122,8 @@ fragment specifiers are:
|
122 | 122 | * `block`: a [_BlockExpression_]
|
123 | 123 | * `stmt`: a [_Statement_] without the trailing semicolon (except for item
|
124 | 124 | statements that require semicolons)
|
125 |
| - * `pat`: a [_PatternNoTopAlt_] |
| 125 | + * `pat_param`: a [_PatternNoTopAlt_] |
| 126 | + * `pat`: equivalent to `pat_param` |
126 | 127 | * `expr`: an [_Expression_]
|
127 | 128 | * `ty`: a [_Type_]
|
128 | 129 | * `ident`: an [IDENTIFIER_OR_KEYWORD]
|
@@ -450,7 +451,7 @@ Matchers like `$i:expr,` or `$i:expr;` would be legal, however, because `,` and
|
450 | 451 | `;` are legal expression separators. The specific rules are:
|
451 | 452 |
|
452 | 453 | * `expr` and `stmt` may only be followed by one of: `=>`, `,`, or `;`.
|
453 |
| - * `pat` may only be followed by one of: `=>`, `,`, `=`, `|`, `if`, or `in`. |
| 454 | + * `pat` and `pat_param` may only be followed by one of: `=>`, `,`, `=`, `|`, `if`, or `in`. |
454 | 455 | * `path` and `ty` may only be followed by one of: `=>`, `,`, `=`, `|`, `;`,
|
455 | 456 | `:`, `>`, `>>`, `[`, `{`, `as`, `where`, or a macro variable of `block`
|
456 | 457 | fragment specifier.
|
|
0 commit comments