about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-08-08 11:34:07 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-10-12 08:46:15 +1100
commitbecf4942a26288916302f9a5f3fc6d4cc88abae8 (patch)
treec7f35dd6a997c26ef0b95c74c8d8d1d1fd69978d /compiler/rustc_parse/src/parser/expr.rs
parent475c71da0710fd1d40c046f9cee04b733b5b2b51 (diff)
downloadrust-becf4942a26288916302f9a5f3fc6d4cc88abae8.tar.gz
rust-becf4942a26288916302f9a5f3fc6d4cc88abae8.zip
Rename `Token::is_op` as `Token::is_punct`.
For consistency with `proc_macro::Punct`.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 91bb2d9eb66..1d883e16f9d 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1592,7 +1592,7 @@ impl<'a> Parser<'a> {
         } else if !ate_colon
             && self.may_recover()
             && (matches!(self.token.kind, token::CloseDelim(_) | token::Comma)
-                || self.token.is_op())
+                || self.token.is_punct())
         {
             let (lit, _) =
                 self.recover_unclosed_char(label_.ident, Parser::mk_token_lit_char, |self_| {