diff options
| author | bors <bors@rust-lang.org> | 2024-07-19 13:39:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-19 13:39:12 +0000 |
| commit | 3811f40d2701b3a8923d2d46e36dd3a93a824b49 (patch) | |
| tree | c4dd3eced80c90cb45e2eb3dbb4f56a5160a5155 /compiler/rustc_parse/src/parser/mod.rs | |
| parent | 11e57241f166194a328438d9264b68c98a18d51f (diff) | |
| parent | 6fe68f88e72fd0b813dc39345d7a5e2a291c1e7c (diff) | |
| download | rust-3811f40d2701b3a8923d2d46e36dd3a93a824b49.tar.gz rust-3811f40d2701b3a8923d2d46e36dd3a93a824b49.zip | |
Auto merge of #127957 - matthiaskrgr:rollup-1u5ivck, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #127350 (Parser: Suggest Placing the Return Type After Function Parameters) - #127621 (Rewrite and rename `issue-22131` and `issue-26006` `run-make` tests to rmake) - #127662 (When finding item gated behind a `cfg` flag, point at it) - #127903 (`force_collect` improvements) - #127932 (rustdoc: fix `current` class on sidebar modnav) - #127943 (Don't allow unsafe statics outside of extern blocks) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 06545e85dd1..7326b9ec51f 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -501,6 +501,7 @@ impl<'a> Parser<'a> { FatalError.raise(); } else { self.expected_one_of_not_found(edible, inedible) + .map(|error_guaranteed| Recovered::Yes(error_guaranteed)) } } @@ -948,11 +949,10 @@ impl<'a> Parser<'a> { let initial_semicolon = self.token.span; while self.eat(&TokenKind::Semi) { - let _ = - self.parse_stmt_without_recovery(false, ForceCollect::Yes).unwrap_or_else(|e| { - e.cancel(); - None - }); + let _ = self.parse_stmt_without_recovery(false, ForceCollect::No).unwrap_or_else(|e| { + e.cancel(); + None + }); } expect_err |
