Skip to content

Commit 9730221

Browse files
committed
Remove excess rib while resolving closures
1 parent 10f4ce3 commit 9730221

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_resolve/src/late.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3514,7 +3514,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
35143514
})
35153515
});
35163516
}
3517-
ExprKind::Async(..) | ExprKind::Closure(..) => {
3517+
// For closures, ClosureOrAsyncRibKind is added in visit_fn
3518+
ExprKind::Closure(..) => visit::walk_expr(self, expr),
3519+
ExprKind::Async(..) => {
35183520
self.with_label_rib(ClosureOrAsyncRibKind, |this| visit::walk_expr(this, expr));
35193521
}
35203522
ExprKind::Repeat(ref elem, ref ct) => {

0 commit comments

Comments
 (0)