aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/expr.rs6
-rw-r--r--crates/hir_ty/src/infer/unify.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index eee3e6ec5..55163c963 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -99,8 +99,8 @@ impl<'a> InferenceContext<'a> {
99 if self.db.trait_solve(krate, goal.value).is_some() { 99 if self.db.trait_solve(krate, goal.value).is_some() {
100 self.obligations.push(implements_fn_trait); 100 self.obligations.push(implements_fn_trait);
101 let output_proj_ty = crate::ProjectionTy { 101 let output_proj_ty = crate::ProjectionTy {
102 associated_ty: to_assoc_type_id(output_assoc_type), 102 associated_ty_id: to_assoc_type_id(output_assoc_type),
103 parameters: substs, 103 substitution: substs,
104 }; 104 };
105 let return_ty = self.normalize_projection_ty(output_proj_ty); 105 let return_ty = self.normalize_projection_ty(output_proj_ty);
106 Some((arg_tys, return_ty)) 106 Some((arg_tys, return_ty))
@@ -261,7 +261,7 @@ impl<'a> InferenceContext<'a> {
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_args: sig_tys.len() - 1,
264 sig: FnSig { variadic: false }, 264 sig: FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: false },
265 substs: Substs(sig_tys.clone().into()), 265 substs: Substs(sig_tys.clone().into()),
266 }) 266 })
267 .intern(&Interner); 267 .intern(&Interner);
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs
index 16d89ed1b..ebc612ca9 100644
--- a/crates/hir_ty/src/infer/unify.rs
+++ b/crates/hir_ty/src/infer/unify.rs
@@ -381,11 +381,11 @@ impl InferenceTable {
381 self.unify_substs(&tr1.substs, &tr2.substs, depth + 1) 381 self.unify_substs(&tr1.substs, &tr2.substs, depth + 1)
382 } 382 }
383 (GenericPredicate::Projection(proj1), GenericPredicate::Projection(proj2)) 383 (GenericPredicate::Projection(proj1), GenericPredicate::Projection(proj2))
384 if proj1.projection_ty.associated_ty == proj2.projection_ty.associated_ty => 384 if proj1.projection_ty.associated_ty_id == proj2.projection_ty.associated_ty_id =>
385 { 385 {
386 self.unify_substs( 386 self.unify_substs(
387 &proj1.projection_ty.parameters, 387 &proj1.projection_ty.substitution,
388 &proj2.projection_ty.parameters, 388 &proj2.projection_ty.substitution,
389 depth + 1, 389 depth + 1,
390 ) && self.unify_inner(&proj1.ty, &proj2.ty, depth + 1) 390 ) && self.unify_inner(&proj1.ty, &proj2.ty, depth + 1)
391 } 391 }