about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-07-03 19:15:39 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-07-12 21:00:13 +0400
commit3ebb8529560b9b80f38467bac86d686f5dae4934 (patch)
treef9ee61ef766d7abbe020e87981948546dc6d7d79 /compiler/rustc_resolve/src
parent577f3c6f52f641a8a8f2b2e39ee9784bbf76d25d (diff)
downloadrust-3ebb8529560b9b80f38467bac86d686f5dae4934.tar.gz
rust-3ebb8529560b9b80f38467bac86d686f5dae4934.zip
Add `LifetimeBinderKind::Closure`
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 80186650fe8..2abbed944a1 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -268,6 +268,7 @@ enum LifetimeBinderKind {
     WhereBound,
     Item,
     Function,
+    Closure,
     ImplBlock,
 }
 
@@ -281,6 +282,7 @@ impl LifetimeBinderKind {
             Item => "item",
             ImplBlock => "impl block",
             Function => "function",
+            Closure => "closure",
         }
     }
 }
@@ -3544,7 +3546,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
                     NormalRibKind,
                     LifetimeRibKind::Generics {
                         binder: expr.id,
-                        kind: LifetimeBinderKind::Function,
+                        kind: LifetimeBinderKind::Closure,
                         span,
                     },
                     |this| visit::walk_expr(this, expr),