diff options
author | Florian Diebold <[email protected]> | 2021-04-05 16:45:18 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 18:19:18 +0100 |
commit | ad20f00844cec9c794e34869be163673ebbed182 (patch) | |
tree | 0f37d26295bc9a8372d09df1612bd08a6d19ff72 /crates/hir_ty/src/infer | |
parent | 69714d36e6617800f3edea174f5d6f76c985ad4c (diff) |
Use VariableKinds in Binders
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index ccaae53e9..d61ef65f2 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -849,7 +849,7 @@ impl<'a> InferenceContext<'a> { | |||
849 | self.write_method_resolution(tgt_expr, func); | 849 | self.write_method_resolution(tgt_expr, func); |
850 | (ty, self.db.value_ty(func.into()), Some(generics(self.db.upcast(), func.into()))) | 850 | (ty, self.db.value_ty(func.into()), Some(generics(self.db.upcast(), func.into()))) |
851 | } | 851 | } |
852 | None => (receiver_ty, Binders::new(0, self.err_ty()), None), | 852 | None => (receiver_ty, Binders::empty(&Interner, self.err_ty()), None), |
853 | }; | 853 | }; |
854 | let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty); | 854 | let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty); |
855 | let method_ty = method_ty.subst(&substs); | 855 | let method_ty = method_ty.subst(&substs); |
@@ -951,7 +951,7 @@ impl<'a> InferenceContext<'a> { | |||
951 | for predicate in generic_predicates.iter() { | 951 | for predicate in generic_predicates.iter() { |
952 | let (predicate, binders) = | 952 | let (predicate, binders) = |
953 | predicate.clone().subst(parameters).into_value_and_skipped_binders(); | 953 | predicate.clone().subst(parameters).into_value_and_skipped_binders(); |
954 | always!(binders == 0); // quantified where clauses not yet handled | 954 | always!(binders.len(&Interner) == 0); // quantified where clauses not yet handled |
955 | self.push_obligation(predicate.cast(&Interner)); | 955 | self.push_obligation(predicate.cast(&Interner)); |
956 | } | 956 | } |
957 | // add obligation for trait implementation, if this is a trait method | 957 | // add obligation for trait implementation, if this is a trait method |