diff options
author | Florian Diebold <[email protected]> | 2021-03-13 18:27:09 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-13 18:27:09 +0000 |
commit | 2d69eb131f58dee1bc188b8df8d5cf0ebf9d97f2 (patch) | |
tree | b22507ea0b79fcd5d38dcf5ae8b731467a38cc41 /crates/hir_ty/src/infer | |
parent | be7a31fbd64943f71afe11b0413c99496526dddc (diff) |
Use chalk_ir::ClosureId
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 3 |
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 |