aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r--crates/hir_ty/src/infer/expr.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index 153f22f25..2e21d796c 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -264,8 +264,9 @@ impl<'a> InferenceContext<'a> {
264 substs: Substs(sig_tys.clone().into()), 264 substs: Substs(sig_tys.clone().into()),
265 }) 265 })
266 .intern(&Interner); 266 .intern(&Interner);
267 let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into();
267 let closure_ty = 268 let closure_ty =
268 TyKind::Closure(self.owner, tgt_expr, Substs::single(sig_ty)).intern(&Interner); 269 TyKind::Closure(closure_id, Substs::single(sig_ty)).intern(&Interner);
269 270
270 // Eagerly try to relate the closure type with the expected 271 // Eagerly try to relate the closure type with the expected
271 // type, otherwise we often won't have enough information to 272 // type, otherwise we often won't have enough information to