File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1032,13 +1032,6 @@ impl<'a> Parser<'a> {
10321032 self . check_unknown_macro_variable ( ) ;
10331033 }
10341034
1035- /// Advance the parser by one token and return the bumped token.
1036- pub fn bump_and_get ( & mut self ) -> token:: Token {
1037- let old_token = mem:: replace ( & mut self . token , token:: Underscore ) ;
1038- self . bump ( ) ;
1039- old_token
1040- }
1041-
10421035 /// Advance the parser using provided token as a next one. Use this when
10431036 /// consuming a part of a token. For example a single `<` from `<<`.
10441037 pub fn bump_with ( & mut self ,
@@ -2663,7 +2656,12 @@ impl<'a> Parser<'a> {
26632656 } ) ) ;
26642657 } ,
26652658 token:: CloseDelim ( _) | token:: Eof => unreachable ! ( ) ,
2666- _ => Ok ( TokenTree :: Token ( self . span , self . bump_and_get ( ) ) ) ,
2659+ _ => {
2660+ let token = mem:: replace ( & mut self . token , token:: Underscore ) ;
2661+ let res = Ok ( TokenTree :: Token ( self . span , token) ) ;
2662+ self . bump ( ) ;
2663+ res
2664+ }
26672665 }
26682666 }
26692667
You can’t perform that action at this time.
0 commit comments