aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-02 16:11:54 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:10 +0000
commita3d8cffde39bfb0d50b87a8ded5e0534adec4cd5 (patch)
tree3be5406b38c2594808c87d9dbecf7aa14b52b67d /crates/ra_hir_ty/src/infer
parent86348f5994cdc3831edf3a5582d6d9d576fd1d80 (diff)
Use variables in predicates as well
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs4
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
26use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; 26use 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 }