File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ the syntax element that matched them. The keyword metavariable `$crate` can be
140
140
used to refer to the current crate; see [ Hygiene] below. Metavariables can be
141
141
transcribed more than once or not at all.
142
142
143
+ For reasons of backwards compatibility, although ` _ ` is a (keyword) identifier,
144
+ it is not matched by the ` ident ` fragment specifier. Similarly, though ` _ ` [ is
145
+ also an expression] [ _UnderscoreExpression_ ] , a standalone underscore is not
146
+ matched by the ` expr ` fragment specifier. However, ` _ ` is matched by the ` expr `
147
+ fragment specifier when it appears as a subexpression.
148
+
143
149
## Repetitions
144
150
145
151
In both the matcher and transcriber, repetitions are indicated by placing the
@@ -495,6 +501,7 @@ For more detail, see the [formal specification].
495
501
[ _Token_ ] : tokens.md
496
502
[ _TypePath_ ] : paths.md#paths-in-types
497
503
[ _Type_ ] : types.md#type-expressions
504
+ [ _UnderscoreExpression_ ] : expressions/underscore-expr.md
498
505
[ _Visibility_ ] : visibility-and-privacy.md
499
506
[ formal specification ] : macro-ambiguity.md
500
507
[ token ] : tokens.md
You can’t perform that action at this time.
0 commit comments