File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ impl Token {
404404 [ DotDot , DotDotDot , DotDotEq ] . contains ( & self . kind )
405405 }
406406
407- pub fn is_op ( & self ) -> bool {
407+ pub fn is_punct ( & self ) -> bool {
408408 match self . kind {
409409 Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp ( _)
410410 | BinOpEq ( _) | At | Dot | DotDot | DotDotDot | DotDotEq | Comma | Semi | Colon
Original file line number Diff line number Diff line change @@ -59,8 +59,11 @@ impl<'a> TokenTreesReader<'a> {
5959 if let Some ( glued) = self . token . glue ( & next_tok) {
6060 self . token = glued;
6161 } else {
62- let this_spacing =
63- if next_tok. is_op ( ) { Spacing :: Joint } else { Spacing :: Alone } ;
62+ let this_spacing = if next_tok. is_punct ( ) {
63+ Spacing :: Joint
64+ } else {
65+ Spacing :: Alone
66+ } ;
6467 break ( this_spacing, next_tok) ;
6568 }
6669 } else {
Original file line number Diff line number Diff line change @@ -1599,7 +1599,7 @@ impl<'a> Parser<'a> {
15991599 } else if !ate_colon
16001600 && self . may_recover ( )
16011601 && ( matches ! ( self . token. kind, token:: CloseDelim ( _) | token:: Comma )
1602- || self . token . is_op ( ) )
1602+ || self . token . is_punct ( ) )
16031603 {
16041604 let ( lit, _) =
16051605 self . recover_unclosed_char ( label_. ident , Parser :: mk_token_lit_char, |self_| {
You can’t perform that action at this time.
0 commit comments