diff options
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index a2a7236a8..ff564106b 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -23,7 +23,7 @@ use crate::{ | |||
23 | traits::{chalk::from_chalk, FnTrait}, | 23 | traits::{chalk::from_chalk, FnTrait}, |
24 | utils::{generics, variant_data, Generics}, | 24 | utils::{generics, variant_data, Generics}, |
25 | AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner, | 25 | AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner, |
26 | ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind, | 26 | ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind, TypeWalk, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | use super::{ | 29 | use super::{ |
@@ -262,7 +262,9 @@ impl<'a> InferenceContext<'a> { | |||
262 | let sig_ty = TyKind::Function(FnPointer { | 262 | let sig_ty = TyKind::Function(FnPointer { |
263 | num_binders: 0, | 263 | num_binders: 0, |
264 | sig: FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: false }, | 264 | sig: FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: false }, |
265 | substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys.clone())), | 265 | substitution: FnSubst( |
266 | Substitution::from_iter(&Interner, sig_tys.clone()).shifted_in(&Interner), | ||
267 | ), | ||
266 | }) | 268 | }) |
267 | .intern(&Interner); | 269 | .intern(&Interner); |
268 | let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into(); | 270 | let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into(); |