diff options
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 6279aa572..25ab3ea4c 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -99,7 +99,7 @@ impl<'a> InferenceContext<'a> { | |||
99 | environment: trait_env, | 99 | environment: trait_env, |
100 | }); | 100 | }); |
101 | if self.db.trait_solve(krate, goal.value).is_some() { | 101 | if self.db.trait_solve(krate, goal.value).is_some() { |
102 | self.obligations.push(implements_fn_trait); | 102 | self.push_obligation(implements_fn_trait); |
103 | let output_proj_ty = crate::ProjectionTy { | 103 | let output_proj_ty = crate::ProjectionTy { |
104 | associated_ty_id: to_assoc_type_id(output_assoc_type), | 104 | associated_ty_id: to_assoc_type_id(output_assoc_type), |
105 | substitution: substs, | 105 | substitution: substs, |
@@ -964,7 +964,7 @@ impl<'a> InferenceContext<'a> { | |||
964 | let (predicate, binders) = | 964 | let (predicate, binders) = |
965 | predicate.clone().subst(parameters).into_value_and_skipped_binders(); | 965 | predicate.clone().subst(parameters).into_value_and_skipped_binders(); |
966 | always!(binders == 0); // quantified where clauses not yet handled | 966 | always!(binders == 0); // quantified where clauses not yet handled |
967 | self.obligations.push(predicate.cast(&Interner)); | 967 | self.push_obligation(predicate.cast(&Interner)); |
968 | } | 968 | } |
969 | // add obligation for trait implementation, if this is a trait method | 969 | // add obligation for trait implementation, if this is a trait method |
970 | match def { | 970 | match def { |
@@ -974,7 +974,7 @@ impl<'a> InferenceContext<'a> { | |||
974 | // construct a TraitRef | 974 | // construct a TraitRef |
975 | let substs = | 975 | let substs = |
976 | parameters.prefix(generics(self.db.upcast(), trait_.into()).len()); | 976 | parameters.prefix(generics(self.db.upcast(), trait_.into()).len()); |
977 | self.obligations.push( | 977 | self.push_obligation( |
978 | TraitRef { trait_id: to_chalk_trait_id(trait_), substitution: substs } | 978 | TraitRef { trait_id: to_chalk_trait_id(trait_), substitution: substs } |
979 | .cast(&Interner), | 979 | .cast(&Interner), |
980 | ); | 980 | ); |