@@ -21,19 +21,19 @@ impl<'a> Parser<'a> {
21
21
/// Checks whether the non-terminal may contain a single (non-keyword) identifier.
22
22
fn may_be_ident ( nt : & token:: Nonterminal ) -> bool {
23
23
match nt {
24
- NtStmt ( .. )
25
- | NtPat ( .. )
26
- | NtExpr ( .. )
27
- | NtTy ( .. )
24
+ NtStmt ( _ )
25
+ | NtPat ( _ )
26
+ | NtExpr ( _ )
27
+ | NtTy ( _ )
28
28
| NtIdent ( ..)
29
- | NtLiteral ( .. ) // `true`, `false`
30
- | NtMeta ( .. )
31
- | NtPath ( .. ) => true ,
29
+ | NtLiteral ( _ ) // `true`, `false`
30
+ | NtMeta ( _ )
31
+ | NtPath ( _ ) => true ,
32
32
33
- NtItem ( .. )
34
- | NtBlock ( .. )
35
- | NtVis ( .. )
36
- | NtLifetime ( .. ) => false ,
33
+ NtItem ( _ )
34
+ | NtBlock ( _ )
35
+ | NtVis ( _ )
36
+ | NtLifetime ( _ ) => false ,
37
37
}
38
38
}
39
39
@@ -50,15 +50,15 @@ impl<'a> Parser<'a> {
50
50
NonterminalKind :: Literal => token. can_begin_literal_maybe_minus ( ) ,
51
51
NonterminalKind :: Vis => match token. kind {
52
52
// The follow-set of :vis + "priv" keyword + interpolated
53
- token:: Comma | token:: Ident ( ..) | token:: Interpolated ( .. ) => true ,
53
+ token:: Comma | token:: Ident ( ..) | token:: Interpolated ( _ ) => true ,
54
54
_ => token. can_begin_type ( ) ,
55
55
} ,
56
56
NonterminalKind :: Block => match & token. kind {
57
57
token:: OpenDelim ( Delimiter :: Brace ) => true ,
58
58
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 ,
62
62
} ,
63
63
_ => false ,
64
64
} ,
@@ -75,7 +75,7 @@ impl<'a> Parser<'a> {
75
75
token:: BinOp ( token:: And ) | // reference
76
76
token:: BinOp ( token:: Minus ) | // negative literal
77
77
token:: AndAnd | // double reference
78
- token:: Literal ( .. ) | // literal
78
+ token:: Literal ( _ ) | // literal
79
79
token:: DotDot | // range pattern (future compat)
80
80
token:: DotDotDot | // range pattern (future compat)
81
81
token:: ModSep | // path
@@ -90,7 +90,7 @@ impl<'a> Parser<'a> {
90
90
NonterminalKind :: Lifetime => match & token. kind {
91
91
token:: Lifetime ( _) => true ,
92
92
token:: Interpolated ( nt) => {
93
- matches ! ( & nt. 0 , NtLifetime ( .. ) )
93
+ matches ! ( & nt. 0 , NtLifetime ( _ ) )
94
94
}
95
95
_ => false ,
96
96
} ,
0 commit comments