@@ -1202,7 +1202,7 @@ impl<'a> Parser<'a> {
1202
1202
}
1203
1203
}
1204
1204
1205
- if self . token . kind . is_close_delim ( ) . is_some ( ) || self . token . kind == token:: Comma {
1205
+ if self . token . kind . close_delim ( ) . is_some ( ) || self . token . kind == token:: Comma {
1206
1206
break ;
1207
1207
} else if trailing_dot. is_none ( ) {
1208
1208
// This loop should only repeat if there is a trailing dot.
@@ -1680,7 +1680,7 @@ impl<'a> Parser<'a> {
1680
1680
self . parse_expr_block ( label, lo, BlockCheckMode :: Default )
1681
1681
} else if !ate_colon
1682
1682
&& self . may_recover ( )
1683
- && ( self . token . kind . is_close_delim ( ) . is_some ( ) || self . token . is_punct ( ) )
1683
+ && ( self . token . kind . close_delim ( ) . is_some ( ) || self . token . is_punct ( ) )
1684
1684
&& could_be_unclosed_char_literal ( label_. ident )
1685
1685
{
1686
1686
let ( lit, _) =
@@ -2268,7 +2268,7 @@ impl<'a> Parser<'a> {
2268
2268
}
2269
2269
2270
2270
fn is_array_like_block ( & mut self ) -> bool {
2271
- matches ! ( self . token. kind, TokenKind :: OpenBrace )
2271
+ self . token . kind == TokenKind :: OpenBrace
2272
2272
&& self
2273
2273
. look_ahead ( 1 , |t| matches ! ( t. kind, TokenKind :: Ident ( ..) | TokenKind :: Literal ( _) ) )
2274
2274
&& self . look_ahead ( 2 , |t| t == & token:: Comma )
@@ -2477,7 +2477,7 @@ impl<'a> Parser<'a> {
2477
2477
fn parse_closure_block_body ( & mut self , ret_span : Span ) -> PResult < ' a , P < Expr > > {
2478
2478
if self . may_recover ( )
2479
2479
&& self . token . can_begin_expr ( )
2480
- && ! matches ! ( self . token. kind, TokenKind :: OpenBrace )
2480
+ && self . token . kind != TokenKind :: OpenBrace
2481
2481
&& !self . token . is_metavar_block ( )
2482
2482
{
2483
2483
let snapshot = self . create_snapshot_for_diagnostic ( ) ;
@@ -2958,7 +2958,7 @@ impl<'a> Parser<'a> {
2958
2958
let ( pat, expr) = self . parse_for_head ( ) ?;
2959
2959
// Recover from missing expression in `for` loop
2960
2960
if matches ! ( expr. kind, ExprKind :: Block ( ..) )
2961
- && ! matches ! ( self . token. kind, token:: OpenBrace )
2961
+ && self . token . kind != token:: OpenBrace
2962
2962
&& self . may_recover ( )
2963
2963
{
2964
2964
let guar = self
0 commit comments