From 7ab44cddc9320f1dfdef40916f33c6f3e83876e6 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 1 Sep 2024 11:16:50 -0400 Subject: Replace walk with visit so we dont skip outermost expr kind in def collector --- compiler/rustc_resolve/src/def_collector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') 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), } -- cgit 1.4.1-3-g733a5