diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-06-23 12:21:23 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-06-23 12:21:23 +0400 |
| commit | 9730221b9d8adafcd7615d5dc43cf83a60baf123 (patch) | |
| tree | 336036a35c9c2443a7982b9d1068b988bd10a131 | |
| parent | 10f4ce324baf7cfb7ce2b2096662b82b79204944 (diff) | |
| download | rust-9730221b9d8adafcd7615d5dc43cf83a60baf123.tar.gz rust-9730221b9d8adafcd7615d5dc43cf83a60baf123.zip | |
Remove excess rib while resolving closures
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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) => { |
