@@ -1202,7 +1202,7 @@ impl<'a> Parser<'a> {
12021202 }
12031203 }
12041204
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 {
12061206 break ;
12071207 } else if trailing_dot. is_none ( ) {
12081208 // This loop should only repeat if there is a trailing dot.
@@ -1680,7 +1680,7 @@ impl<'a> Parser<'a> {
16801680 self . parse_expr_block ( label, lo, BlockCheckMode :: Default )
16811681 } else if !ate_colon
16821682 && 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 ( ) )
16841684 && could_be_unclosed_char_literal ( label_. ident )
16851685 {
16861686 let ( lit, _) =
@@ -2268,7 +2268,7 @@ impl<'a> Parser<'a> {
22682268 }
22692269
22702270 fn is_array_like_block ( & mut self ) -> bool {
2271- matches ! ( self . token. kind, TokenKind :: OpenBrace )
2271+ self . token . kind == TokenKind :: OpenBrace
22722272 && self
22732273 . look_ahead ( 1 , |t| matches ! ( t. kind, TokenKind :: Ident ( ..) | TokenKind :: Literal ( _) ) )
22742274 && self . look_ahead ( 2 , |t| t == & token:: Comma )
@@ -2477,7 +2477,7 @@ impl<'a> Parser<'a> {
24772477 fn parse_closure_block_body ( & mut self , ret_span : Span ) -> PResult < ' a , P < Expr > > {
24782478 if self . may_recover ( )
24792479 && self . token . can_begin_expr ( )
2480- && ! matches ! ( self . token. kind, TokenKind :: OpenBrace )
2480+ && self . token . kind != TokenKind :: OpenBrace
24812481 && !self . token . is_metavar_block ( )
24822482 {
24832483 let snapshot = self . create_snapshot_for_diagnostic ( ) ;
@@ -2958,7 +2958,7 @@ impl<'a> Parser<'a> {
29582958 let ( pat, expr) = self . parse_for_head ( ) ?;
29592959 // Recover from missing expression in `for` loop
29602960 if matches ! ( expr. kind, ExprKind :: Block ( ..) )
2961- && ! matches ! ( self . token. kind, token:: OpenBrace )
2961+ && self . token . kind != token:: OpenBrace
29622962 && self . may_recover ( )
29632963 {
29642964 let guar = self
0 commit comments