From 2d69eb131f58dee1bc188b8df8d5cf0ebf9d97f2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 13 Mar 2021 19:27:09 +0100 Subject: Use chalk_ir::ClosureId --- crates/hir_ty/src/infer/expr.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/hir_ty/src/infer') 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> { substs: Substs(sig_tys.clone().into()), }) .intern(&Interner); + let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into(); let closure_ty = - TyKind::Closure(self.owner, tgt_expr, Substs::single(sig_ty)).intern(&Interner); + TyKind::Closure(closure_id, Substs::single(sig_ty)).intern(&Interner); // Eagerly try to relate the closure type with the expected // type, otherwise we often won't have enough information to -- cgit v1.2.3