diff options
| author | bors <bors@rust-lang.org> | 2023-02-24 20:49:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-24 20:49:11 +0000 |
| commit | c5c7d2b37780dac1092e75f12ab97dd56c30861d (patch) | |
| tree | 49c2d2c3260c227c8505e60f115981e27183caef /compiler/rustc_parse/src | |
| parent | 07c993eba8b76eae497e98433ae075b00f01be10 (diff) | |
| parent | c77cf40df0bb75aceb85ab4908fbdb103538df9a (diff) | |
| download | rust-c5c7d2b37780dac1092e75f12ab97dd56c30861d.tar.gz rust-c5c7d2b37780dac1092e75f12ab97dd56c30861d.zip | |
Auto merge of #108421 - Dylan-DPC:rollup-mpeovxd, r=Dylan-DPC
Rollup of 10 pull requests Successful merges: - #106541 (implement const iterator using `rustc_do_not_const_check`) - #106918 (Rebuild BinaryHeap on unwind from retain) - #106923 (Restore behavior when primary bundle is missing) - #108169 (Make query keys `Copy`) - #108287 (Add test for bad cast with deferred projection equality) - #108370 (std: time: Avoid to use "was created" in elapsed() description) - #108377 (Fix ICE in 'duplicate diagnostic item' diagnostic) - #108388 (parser: provide better suggestions and errors on closures with braces missing) - #108391 (Fix `is_terminal`'s handling of long paths on Windows.) - #108401 (diagnostics: remove inconsistent English article "this" from E0107) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 623c82b37e0..fda9151478f 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -982,7 +982,11 @@ impl<'a> Parser<'a> { let initial_semicolon = self.token.span; while self.eat(&TokenKind::Semi) { - let _ = self.parse_stmt(ForceCollect::Yes)?; + let _ = + self.parse_stmt_without_recovery(false, ForceCollect::Yes).unwrap_or_else(|e| { + e.cancel(); + None + }); } expect_err.set_primary_message( |
