File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Top Open diff view settings Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Top Open diff view settings 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
140140used to refer to the current crate; see [ Hygiene] below. Metavariables can be
141141transcribed more than once or not at all.
142142
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+
143149## Repetitions
144150
145151In both the matcher and transcriber, repetitions are indicated by placing the
@@ -495,6 +501,7 @@ For more detail, see the [formal specification].
495501[ _Token_ ] : tokens.md
496502[ _TypePath_ ] : paths.md#paths-in-types
497503[ _Type_ ] : types.md#type-expressions
504+ [ _UnderscoreExpression_ ] : expressions/underscore-expr.md
498505[ _Visibility_ ] : visibility-and-privacy.md
499506[ formal specification ] : macro-ambiguity.md
500507[ token ] : tokens.md
You can’t perform that action at this time.
0 commit comments