diff options
| author | bors <bors@rust-lang.org> | 2024-03-08 07:09:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-08 07:09:40 +0000 |
| commit | 4db028f44995266895ae9e75b0a0726cc690ef7c (patch) | |
| tree | 9da59f255a8a2d5451877c60b9b4d48ab5328542 /compiler/rustc_parse/src/parser | |
| parent | 305d2b0f5c7e8081ab21f78e2d53ed8f84aebecd (diff) | |
| parent | fcd2efeb1180162091ce8f79087b2cbd56ea0b76 (diff) | |
| download | rust-4db028f44995266895ae9e75b0a0726cc690ef7c.tar.gz rust-4db028f44995266895ae9e75b0a0726cc690ef7c.zip | |
Auto merge of #3365 - rust-lang:rustup-2024-03-08, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/stmt.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index 54854cd2da9..ea9c78ca34c 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -787,13 +787,17 @@ impl<'a> Parser<'a> { let suggest_eq = if self.token.kind == token::Dot && let _ = self.bump() && let mut snapshot = self.create_snapshot_for_diagnostic() - && let Ok(_) = snapshot.parse_dot_suffix_expr( - colon_sp, - self.mk_expr_err( + && let Ok(_) = snapshot + .parse_dot_suffix_expr( colon_sp, - self.dcx().delayed_bug("error during `:` -> `=` recovery"), - ), - ) { + self.mk_expr_err( + colon_sp, + self.dcx() + .delayed_bug("error during `:` -> `=` recovery"), + ), + ) + .map_err(Diag::cancel) + { true } else if let Some(op) = self.check_assoc_op() && op.node.can_continue_expr_unambiguously() |
