diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-02 04:19:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 04:19:31 +0200 |
| commit | 38b6a66deffb15a1c12f5c442f86ebb1f7858c03 (patch) | |
| tree | 9bf0441d92c10c27baa438a81d88d7f4e6b1970a /compiler | |
| parent | 3ea339794333f81057ae24dfd59d5469a296bb5e (diff) | |
| parent | 7ab44cddc9320f1dfdef40916f33c6f3e83876e6 (diff) | |
Rollup merge of #129858 - compiler-errors:async-def, r=cjgillot
Replace walk with visit so we dont skip outermost expr kind in def collector This affects async closures with macros as their body expr. Fixes #129855. r? ``@cjgillot`` or anyone else
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_resolve/src/def_collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/def_collector.rs b/compiler/rustc_resolve/src/def_collector.rs index a70d51606f7..0fedb998463 100644 --- a/compiler/rustc_resolve/src/def_collector.rs +++ b/compiler/rustc_resolve/src/def_collector.rs @@ -223,7 +223,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> { // we must create two defs. let coroutine_def = self.create_def(coroutine_kind.closure_id(), kw::Empty, DefKind::Closure, span); - self.with_parent(coroutine_def, |this| visit::walk_expr(this, body)); + self.with_parent(coroutine_def, |this| this.visit_expr(body)); } _ => visit::walk_fn(self, fn_kind), } |
