Skip to content

Commit 3a6ddea

Browse files
committed
Add pat_param to follow set restrictions.
1 parent fb82ff7 commit 3a6ddea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/macros-by-example.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
>
2929
> _MacroFragSpec_ :\
3030
>       `block` | `expr` | `ident` | `item` | `lifetime` | `literal`\
31-
>    | `meta` | `pat` | `pat_param` | `path` | `stmt` | `tt` | `ty` | `vis`
31+
>    | `meta` | `pat` | `pat_param` | `path` | `stmt` | `tt` | `ty` | `vis`
3232
>
3333
> _MacroRepSep_ :\
3434
> &nbsp;&nbsp; [_Token_]<sub>_except delimiters and repetition operators_</sub>
@@ -451,7 +451,7 @@ Matchers like `$i:expr,` or `$i:expr;` would be legal, however, because `,` and
451451
`;` are legal expression separators. The specific rules are:
452452

453453
* `expr` and `stmt` may only be followed by one of: `=>`, `,`, or `;`.
454-
* `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`.
455455
* `path` and `ty` may only be followed by one of: `=>`, `,`, `=`, `|`, `;`,
456456
`:`, `>`, `>>`, `[`, `{`, `as`, `where`, or a macro variable of `block`
457457
fragment specifier.

0 commit comments

Comments
 (0)