File tree 1 file changed +7
-12
lines changed
compiler/rustc_parse/src/lexer
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> {
55
55
let ( this_spacing, next_tok) = loop {
56
56
let ( next_tok, is_next_tok_preceded_by_whitespace) =
57
57
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 {
70
59
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) ;
71
66
}
72
67
} ;
73
68
let this_tok = std:: mem:: replace ( & mut self . token , next_tok) ;
You can’t perform that action at this time.
0 commit comments