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 {
404
404
[ DotDot , DotDotDot , DotDotEq ] . contains ( & self . kind )
405
405
}
406
406
407
- pub fn is_op ( & self ) -> bool {
407
+ pub fn is_punct ( & self ) -> bool {
408
408
match self . kind {
409
409
Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp ( _)
410
410
| 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> {
59
59
if let Some ( glued) = self . token . glue ( & next_tok) {
60
60
self . token = glued;
61
61
} 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
+ } ;
64
67
break ( this_spacing, next_tok) ;
65
68
}
66
69
} else {
Original file line number Diff line number Diff line change @@ -1599,7 +1599,7 @@ impl<'a> Parser<'a> {
1599
1599
} else if !ate_colon
1600
1600
&& self . may_recover ( )
1601
1601
&& ( matches ! ( self . token. kind, token:: CloseDelim ( _) | token:: Comma )
1602
- || self . token . is_op ( ) )
1602
+ || self . token . is_punct ( ) )
1603
1603
{
1604
1604
let ( lit, _) =
1605
1605
self . recover_unclosed_char ( label_. ident , Parser :: mk_token_lit_char, |self_| {
You can’t perform that action at this time.
0 commit comments