diff options
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 185a2dfc3..a2a7236a8 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -22,8 +22,8 @@ use crate::{ | |||
22 | to_chalk_trait_id, | 22 | to_chalk_trait_id, |
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, InEnvironment, Interner, ProjectionTyExt, | 25 | AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner, |
26 | Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind, | 26 | ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyKind, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | use super::{ | 29 | use super::{ |
@@ -260,9 +260,9 @@ impl<'a> InferenceContext<'a> { | |||
260 | }; | 260 | }; |
261 | sig_tys.push(ret_ty.clone()); | 261 | sig_tys.push(ret_ty.clone()); |
262 | let sig_ty = TyKind::Function(FnPointer { | 262 | let sig_ty = TyKind::Function(FnPointer { |
263 | num_args: sig_tys.len() - 1, | 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 | substs: Substitution::from_iter(&Interner, sig_tys.clone()), | 265 | substitution: FnSubst(Substitution::from_iter(&Interner, sig_tys.clone())), |
266 | }) | 266 | }) |
267 | .intern(&Interner); | 267 | .intern(&Interner); |
268 | let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into(); | 268 | let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into(); |