diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index e36f55b2e02..640d13ea435 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -3514,7 +3514,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { }) }); } - ExprKind::Async(..) | ExprKind::Closure(..) => { + // For closures, ClosureOrAsyncRibKind is added in visit_fn + ExprKind::Closure(..) => visit::walk_expr(self, expr), + ExprKind::Async(..) => { self.with_label_rib(ClosureOrAsyncRibKind, |this| visit::walk_expr(this, expr)); } ExprKind::Repeat(ref elem, ref ct) => {