diff options
| author | Ralf Jung <post@ralfj.de> | 2022-10-30 09:08:48 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-10-30 09:08:48 +0100 |
| commit | bfe23b918fcc2eed132d119ef0535b0bf2c43ea2 (patch) | |
| tree | fc386ad1d527519b5cb6c27e66e32dbc3adbc713 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | c162fd36d250f1a76e00ffa55b9d827d0db7e0bc (diff) | |
| parent | 849d89b0312f1d61d51ee1e2139876a4eb0f0fc4 (diff) | |
| download | rust-bfe23b918fcc2eed132d119ef0535b0bf2c43ea2.tar.gz rust-bfe23b918fcc2eed132d119ef0535b0bf2c43ea2.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index ca216b1cd10..a781748efc5 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2112,6 +2112,8 @@ impl<'a> Parser<'a> { // HACK: This is needed so we can detect whether we're inside a macro, // where regular assumptions about what tokens can follow other tokens // don't necessarily apply. + && self.may_recover() + // FIXME(Nilstrieb): Remove this check once `may_recover` actually stops recovery && self.subparser_name.is_none() { // It is likely that the closure body is a block but where the |
