File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,7 @@ pub(crate) struct ParsedMacroArgs {
84
84
fn check_keyword < ' a , ' b : ' a > ( parser : & ' a mut Parser < ' b > ) -> Option < MacroArg > {
85
85
for & keyword in RUST_KW . iter ( ) {
86
86
if parser. token . is_keyword ( keyword)
87
- && parser. look_ahead ( 1 , |t| {
88
- t. kind == TokenKind :: Eof || t. kind == TokenKind :: Comma
89
- } )
87
+ && parser. look_ahead ( 1 , |t| * t == TokenKind :: Eof || * t == TokenKind :: Comma )
90
88
{
91
89
parser. bump ( ) ;
92
90
return Some ( MacroArg :: Keyword (
@@ -131,7 +129,7 @@ pub(crate) fn parse_macro_args(
131
129
Some ( arg) => {
132
130
args. push ( arg) ;
133
131
parser. bump ( ) ;
134
- if parser. token . kind == TokenKind :: Eof && args. len ( ) == 2 {
132
+ if parser. token == TokenKind :: Eof && args. len ( ) == 2 {
135
133
vec_with_semi = true ;
136
134
break ;
137
135
}
@@ -150,7 +148,7 @@ pub(crate) fn parse_macro_args(
150
148
151
149
parser. bump ( ) ;
152
150
153
- if parser. token . kind == TokenKind :: Eof {
151
+ if parser. token == TokenKind :: Eof {
154
152
trailing_comma = true ;
155
153
break ;
156
154
}
You can’t perform that action at this time.
0 commit comments