diff options
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index b32df8e90..b69785e55 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -20,7 +20,7 @@ use crate::{ | |||
20 | traits::InEnvironment, | 20 | traits::InEnvironment, |
21 | utils::{generics, variant_data, Generics}, | 21 | utils::{generics, variant_data, Generics}, |
22 | ApplicationTy, CallableDef, InferTy, IntTy, Mutability, Obligation, Substs, TraitRef, Ty, | 22 | ApplicationTy, CallableDef, InferTy, IntTy, Mutability, Obligation, Substs, TraitRef, Ty, |
23 | TypeCtor, TypeWalk, Uncertain, Binders, | 23 | TypeCtor, Uncertain, Binders, |
24 | }; | 24 | }; |
25 | 25 | ||
26 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; | 26 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; |
@@ -686,7 +686,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
686 | if let TypeCtor::FnDef(def) = a_ty.ctor { | 686 | if let TypeCtor::FnDef(def) = a_ty.ctor { |
687 | let generic_predicates = self.db.generic_predicates(def.into()); | 687 | let generic_predicates = self.db.generic_predicates(def.into()); |
688 | for predicate in generic_predicates.iter() { | 688 | for predicate in generic_predicates.iter() { |
689 | let predicate = predicate.clone().subst_type_params(self.db, def.into(), &a_ty.parameters); | 689 | let predicate = predicate.clone().subst(&a_ty.parameters); |
690 | if let Some(obligation) = Obligation::from_predicate(predicate) { | 690 | if let Some(obligation) = Obligation::from_predicate(predicate) { |
691 | self.obligations.push(obligation); | 691 | self.obligations.push(obligation); |
692 | } | 692 | } |