about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-27 21:36:07 +0000
committerbors <bors@rust-lang.org>2022-10-27 21:36:07 +0000
commit126dbdc9c78446ad4cf41f5f8510a7cee59ff966 (patch)
treef4b91936c399e3f916fc8962813b6c87285617a9 /compiler/rustc_parse/src/parser/expr.rs
parent0da281b6068a7d889ae89a9bd8991284cc9b7535 (diff)
parentae4dc125196a62447ab07ba6b130d936f56a66d0 (diff)
downloadrust-126dbdc9c78446ad4cf41f5f8510a7cee59ff966.tar.gz
rust-126dbdc9c78446ad4cf41f5f8510a7cee59ff966.zip
Auto merge of #103629 - matthiaskrgr:rollup-r94tqfa, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #103110 (remove redundant Send impl for references)
 - #103255 (Clean up hidden type registration)
 - #103394 (Clarify documentation about the memory layout of `UnsafeCell`)
 - #103408 (Clean return-position `impl Trait` in traits correctly in rustdoc)
 - #103505 (rustdoc: parse self-closing tags and attributes in `invalid_html_tags`)
 - #103524 (rustc_metadata: Add struct and variant constructors to module children at encoding time)
 - #103544 (Add flag to forbid recovery in the parser)
 - #103616 (rustdoc: remove CSS workaround for Firefox 29)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
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