Rollup merge of #98419 - WaffleLapkin:remove_excess_rib, r=compiler-errors
Remove excess rib while resolving closures
I've mentioned this on [zulip](286982959
), in `rustc_resolve`, while resolving closures we add an excess `ClosureOrAsyncRibKind`. It's excess because we later add another one in `visit_fn`.
I couldn't find a way in which removing this will break anything, all test seem to pass, etc.
r? ``@compiler-errors``
cc ``@davidtwco``
This commit is contained in:
commit
5e98e55668
1 changed files with 3 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue