about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-10-04 01:35:07 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-10-04 01:35:07 +0000
commit8fd345dd4b85b6758896995beb5b0417efd52364 (patch)
treecdecfad5b29fa2c7a245b36ca0d3a6fe54be8de5 /compiler/rustc_parse/src/parser/expr.rs
parent18ec4e9bcd7ac13e51c521c9be127e98bdb58faf (diff)
downloadrust-8fd345dd4b85b6758896995beb5b0417efd52364.tar.gz
rust-8fd345dd4b85b6758896995beb5b0417efd52364.zip
review comments
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 2f8e3bb6497..91bb2d9eb66 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -2998,7 +2998,6 @@ impl<'a> Parser<'a> {
                         } else {
                             Applicability::MaybeIncorrect
                         };
-                        // self.recover_stmt_(SemiColonMode::Ignore, BlockMode::Ignore);
                         err.span_suggestion_verbose(sugg_sp, msg, "=> ".to_string(), applicability);
                     }
                 }
@@ -3171,7 +3170,7 @@ impl<'a> Parser<'a> {
                             self.token.span.shrink_to_lo(),
                             "try naming a field",
                             &format!("{ident}: ", ),
-                            Applicability::HasPlaceholders,
+                            Applicability::MaybeIncorrect,
                         );
                     }
                     if in_if_guard && close_delim == Delimiter::Brace {
@@ -3325,7 +3324,7 @@ impl<'a> Parser<'a> {
 
             // Check if a colon exists one ahead. This means we're parsing a fieldname.
             let is_shorthand = !this.look_ahead(1, |t| t == &token::Colon || t == &token::Eq);
-            // Proactively check whether parsing the field will be correct.
+            // Proactively check whether parsing the field will be incorrect.
             let is_wrong = this.token.is_ident()
                 && !this.token.is_reserved_ident()
                 && !this.look_ahead(1, |t| {