@@ -134,7 +134,7 @@ Valid fragment specifiers are:
134134 * ` block ` : a [ BlockExpression]
135135 * ` expr ` : an [ Expression]
136136 * ` expr_2021 ` : an [ Expression] except [ UnderscoreExpression] and [ ConstBlockExpression] (see [ macro.decl.meta.edition2024] )
137- * ` ident ` : an [ IDENTIFIER_OR_KEYWORD] or [ RAW_IDENTIFIER ]
137+ * ` ident ` : an [ IDENTIFIER_OR_KEYWORD] , [ RAW_IDENTIFIER ] , or [ ` $crate ` ]
138138 * ` item ` : an [ Item]
139139 * ` lifetime ` : a [ LIFETIME_TOKEN]
140140 * ` literal ` : matches ` - ` <sup >?</sup >[ LiteralExpression]
@@ -151,10 +151,10 @@ r[macro.decl.meta.transcription]
151151In the transcriber, metavariables are referred to simply by ` $ ` _ name_ , since
152152the fragment kind is specified in the matcher. Metavariables are replaced with
153153the syntax element that matched them.
154+ Metavariables can be transcribed more than once or not at all.
154155
155156r[ 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.
158158
159159r[ macro.decl.meta.edition2021]
160160> [ !EDITION-2021]
@@ -594,3 +594,4 @@ For more detail, see the [formal specification].
594594[ Metavariables ] : #metavariables
595595[ Repetitions ] : #repetitions
596596[ token ] : tokens.md
597+ [ `$crate` ] : macro.decl.hygiene.crate
0 commit comments