@@ -21,19 +21,19 @@ impl<'a> Parser<'a> {
2121 /// Checks whether the non-terminal may contain a single (non-keyword) identifier.
2222 fn may_be_ident ( nt : & token:: Nonterminal ) -> bool {
2323 match nt {
24- NtStmt ( .. )
25- | NtPat ( .. )
26- | NtExpr ( .. )
27- | NtTy ( .. )
24+ NtStmt ( _ )
25+ | NtPat ( _ )
26+ | NtExpr ( _ )
27+ | NtTy ( _ )
2828 | NtIdent ( ..)
29- | NtLiteral ( .. ) // `true`, `false`
30- | NtMeta ( .. )
31- | NtPath ( .. ) => true ,
29+ | NtLiteral ( _ ) // `true`, `false`
30+ | NtMeta ( _ )
31+ | NtPath ( _ ) => true ,
3232
33- NtItem ( .. )
34- | NtBlock ( .. )
35- | NtVis ( .. )
36- | NtLifetime ( .. ) => false ,
33+ NtItem ( _ )
34+ | NtBlock ( _ )
35+ | NtVis ( _ )
36+ | NtLifetime ( _ ) => false ,
3737 }
3838 }
3939
@@ -50,15 +50,15 @@ impl<'a> Parser<'a> {
5050 NonterminalKind :: Literal => token. can_begin_literal_maybe_minus ( ) ,
5151 NonterminalKind :: Vis => match token. kind {
5252 // The follow-set of :vis + "priv" keyword + interpolated
53- token:: Comma | token:: Ident ( ..) | token:: Interpolated ( .. ) => true ,
53+ token:: Comma | token:: Ident ( ..) | token:: Interpolated ( _ ) => true ,
5454 _ => token. can_begin_type ( ) ,
5555 } ,
5656 NonterminalKind :: Block => match & token. kind {
5757 token:: OpenDelim ( Delimiter :: Brace ) => true ,
5858 token:: Interpolated ( nt) => match & nt. 0 {
59- NtBlock ( .. ) | NtLifetime ( .. ) | NtStmt ( .. ) | NtExpr ( .. ) | NtLiteral ( .. ) => true ,
60- NtItem ( .. ) | NtPat ( .. ) | NtTy ( .. ) | NtIdent ( ..) | NtMeta ( .. ) | NtPath ( .. )
61- | NtVis ( .. ) => false ,
59+ NtBlock ( _ ) | NtLifetime ( _ ) | NtStmt ( _ ) | NtExpr ( _ ) | NtLiteral ( _ ) => true ,
60+ NtItem ( _ ) | NtPat ( _ ) | NtTy ( _ ) | NtIdent ( ..) | NtMeta ( _ ) | NtPath ( _ )
61+ | NtVis ( _ ) => false ,
6262 } ,
6363 _ => false ,
6464 } ,
@@ -75,7 +75,7 @@ impl<'a> Parser<'a> {
7575 token:: BinOp ( token:: And ) | // reference
7676 token:: BinOp ( token:: Minus ) | // negative literal
7777 token:: AndAnd | // double reference
78- token:: Literal ( .. ) | // literal
78+ token:: Literal ( _ ) | // literal
7979 token:: DotDot | // range pattern (future compat)
8080 token:: DotDotDot | // range pattern (future compat)
8181 token:: ModSep | // path
@@ -90,7 +90,7 @@ impl<'a> Parser<'a> {
9090 NonterminalKind :: Lifetime => match & token. kind {
9191 token:: Lifetime ( _) => true ,
9292 token:: Interpolated ( nt) => {
93- matches ! ( & nt. 0 , NtLifetime ( .. ) )
93+ matches ! ( & nt. 0 , NtLifetime ( _ ) )
9494 }
9595 _ => false ,
9696 } ,
0 commit comments