Remove excess rib while resolving closures

This commit is contained in:
Maybe Waffle 2022-06-23 12:21:23 +04:00
parent 10f4ce324b
commit 9730221b9d

View File

@ -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) => {