diff options
| author | bors <bors@rust-lang.org> | 2024-02-27 00:55:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-27 00:55:14 +0000 |
| commit | 71ffdf7ff7ac6df5f9f64de7e780b8345797e8a0 (patch) | |
| tree | ae290c8dcb8654460eff1ca65a6ecafa8caf874d /compiler/rustc_parse/src/parser/diagnostics.rs | |
| parent | 5c786a7fe307acf8b0143e1186c8799840da4095 (diff) | |
| parent | ec5c5b7da8822122325d45625b9978fd3f05d84f (diff) | |
| download | rust-71ffdf7ff7ac6df5f9f64de7e780b8345797e8a0.tar.gz rust-71ffdf7ff7ac6df5f9f64de7e780b8345797e8a0.zip | |
Auto merge of #121655 - matthiaskrgr:rollup-qpx3kks, r=matthiaskrgr
Rollup of 4 pull requests
Successful merges:
- #121598 (rename 'try' intrinsic to 'catch_unwind')
- #121639 (Update books)
- #121648 (Update Vec and String `{from,into}_raw_parts`-family docs)
- #121651 (Properly emit `expected ;` on `#[attr] expr`)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index cc1f7c8ac7d..995e140b329 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -800,9 +800,8 @@ impl<'a> Parser<'a> { { Ok(next_attr) => next_attr, Err(inner_err) => { - err.cancel(); inner_err.cancel(); - return self.dcx().span_delayed_bug(expr.span, "not a tail expression"); + return err.emit(); } } && let ast::AttrKind::Normal(next_attr_kind) = next_attr.kind @@ -813,9 +812,8 @@ impl<'a> Parser<'a> { let next_expr = match snapshot.parse_expr() { Ok(next_expr) => next_expr, Err(inner_err) => { - err.cancel(); inner_err.cancel(); - return self.dcx().span_delayed_bug(expr.span, "not a tail expression"); + return err.emit(); } }; // We have for sure |
