aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-05 20:56:40 +0100
committerFlorian Diebold <[email protected]>2021-04-05 20:58:53 +0100
commitb67148daea86d85d211c4243f22635d6ac7e1983 (patch)
tree0f666c5b917de8a0f2ebf5fba185500d153036f3 /crates/hir_ty/src/infer
parent2a83645e1bb01578c4bbe5f71418d354108dfd77 (diff)
Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/expr.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index 82ab9c5fe..185a2dfc3 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -964,8 +964,10 @@ impl<'a> InferenceContext<'a> {
964 if let AssocContainerId::TraitId(trait_) = f.lookup(self.db.upcast()).container 964 if let AssocContainerId::TraitId(trait_) = f.lookup(self.db.upcast()).container
965 { 965 {
966 // construct a TraitRef 966 // construct a TraitRef
967 let substs = 967 let substs = crate::subst_prefix(
968 parameters.prefix(generics(self.db.upcast(), trait_.into()).len()); 968 &*parameters,
969 generics(self.db.upcast(), trait_.into()).len(),
970 );
969 self.push_obligation( 971 self.push_obligation(
970 TraitRef { trait_id: to_chalk_trait_id(trait_), substitution: substs } 972 TraitRef { trait_id: to_chalk_trait_id(trait_), substitution: substs }
971 .cast(&Interner), 973 .cast(&Interner),