File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
compiler/rustc_parse/src/lexer Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -55,19 +55,14 @@ impl<'a> TokenTreesReader<'a> {
5555 let ( this_spacing, next_tok) = loop {
5656 let ( next_tok, is_next_tok_preceded_by_whitespace) =
5757 self . string_reader . next_token ( ) ;
58- if !is_next_tok_preceded_by_whitespace {
59- if let Some ( glued) = self . token . glue ( & next_tok) {
60- self . token = glued;
61- } else {
62- let this_spacing = if next_tok. is_punct ( ) {
63- Spacing :: Joint
64- } else {
65- Spacing :: Alone
66- } ;
67- break ( this_spacing, next_tok) ;
68- }
69- } else {
58+ if is_next_tok_preceded_by_whitespace {
7059 break ( Spacing :: Alone , next_tok) ;
60+ } else if let Some ( glued) = self . token . glue ( & next_tok) {
61+ self . token = glued;
62+ } else {
63+ let this_spacing =
64+ if next_tok. is_punct ( ) { Spacing :: Joint } else { Spacing :: Alone } ;
65+ break ( this_spacing, next_tok) ;
7166 }
7267 } ;
7368 let this_tok = std:: mem:: replace ( & mut self . token , next_tok) ;
You can’t perform that action at this time.
0 commit comments