diff --git a/src/macros-by-example.md b/src/macros-by-example.md index c2a7e885c..5efad772a 100644 --- a/src/macros-by-example.md +++ b/src/macros-by-example.md @@ -28,7 +28,7 @@ > > _MacroFragSpec_ :\ >       `block` | `expr` | `ident` | `item` | `lifetime` | `literal`\ ->    | `meta` | `pat` | `pat2015` | `pat2021` | `path` | `stmt` | `tt` | `ty` | `vis` +>    | `meta` | `pat` | `pat_param` | `path` | `stmt` | `tt` | `ty` | `vis` > > _MacroRepSep_ :\ >    [_Token_]_except delimiters and repetition operators_ @@ -122,9 +122,8 @@ fragment specifiers are: * `block`: a [_BlockExpression_] * `stmt`: a [_Statement_] without the trailing semicolon (except for item statements that require semicolons) - * `pat2015`: a [_PatternNoTopAlt_] - * `pat2021`: a [_Pattern_] - * `pat`: equivalent to either `pat2015` or `pat2021`, depending on edition (see note below). + * `pat_param`: a [_PatternNoTopAlt_] + * `pat`: equivalent to `pat_param` * `expr`: an [_Expression_] * `ty`: a [_Type_] * `ident`: an [IDENTIFIER_OR_KEYWORD] @@ -135,11 +134,6 @@ fragment specifiers are: * `vis`: a possibly empty [_Visibility_] qualifier * `literal`: matches `-`?[_LiteralExpression_] -> **Edition Differences**: In Editions 2015 and 2018, `pat` fragment-specifiers -> do not allow top-level or-patterns (i.e. they accept [_PatternNoTopAlt_]). In -> Edition 2021, this was changed so that top-level or-patterns are accepted by -> `pat` (i.e. [_Pattern_]). - In the transcriber, metavariables are referred to simply by `$`_name_, since the fragment kind is specified in the matcher. Metavariables are replaced with the syntax element that matched them. The keyword metavariable `$crate` can be