@@ -134,7 +134,7 @@ Valid fragment specifiers are:
134
134
* ` block ` : a [ BlockExpression]
135
135
* ` expr ` : an [ Expression]
136
136
* ` expr_2021 ` : an [ Expression] except [ UnderscoreExpression] and [ ConstBlockExpression] (see [ macro.decl.meta.edition2024] )
137
- * ` ident ` : an [ IDENTIFIER_OR_KEYWORD] , [ RAW_IDENTIFIER] , or ` $crate `
137
+ * ` ident ` : an [ IDENTIFIER_OR_KEYWORD] , [ RAW_IDENTIFIER] , or [ ` $crate ` ]
138
138
* ` item ` : an [ Item]
139
139
* ` lifetime ` : a [ LIFETIME_TOKEN]
140
140
* ` literal ` : matches ` - ` <sup >?</sup >[ LiteralExpression]
@@ -151,10 +151,10 @@ r[macro.decl.meta.transcription]
151
151
In the transcriber, metavariables are referred to simply by ` $ ` _ name_ , since
152
152
the fragment kind is specified in the matcher. Metavariables are replaced with
153
153
the syntax element that matched them.
154
+ Metavariables can be transcribed more than once or not at all.
154
155
155
156
r[ macro.decl.meta.dollar-crate]
156
- The keyword metavariable ` $crate ` can be used to refer to the current crate; see [ Hygiene] below. Metavariables can be
157
- transcribed more than once or not at all.
157
+ The keyword metavariable [ ` $crate ` ] can be used to refer to the current crate.
158
158
159
159
r[ macro.decl.meta.edition2021]
160
160
> [ !EDITION-2021]
@@ -594,3 +594,4 @@ For more detail, see the [formal specification].
594
594
[ Metavariables ] : #metavariables
595
595
[ Repetitions ] : #repetitions
596
596
[ token ] : tokens.md
597
+ [ `$crate` ] : macro.decl.hygiene.crate
0 commit comments