diff options
author | Florian Diebold <[email protected]> | 2021-04-03 21:18:02 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-04 12:16:38 +0100 |
commit | 5d2b488aeb17410aec3b89eac69038c51f332448 (patch) | |
tree | 30ef50eb5dc4e8c572c6bec969ce96b3ed2f3e68 /crates/hir_ty/src/method_resolution.rs | |
parent | 77333a571ffb401a6765bbc80dea082ad08238d9 (diff) |
Replace remaining uses of Substitution::build_for_def
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index b9cc081e8..a76586f0c 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -709,7 +709,7 @@ pub(crate) fn inherent_impl_substs( | |||
709 | ) -> Option<Substitution> { | 709 | ) -> Option<Substitution> { |
710 | // we create a var for each type parameter of the impl; we need to keep in | 710 | // we create a var for each type parameter of the impl; we need to keep in |
711 | // mind here that `self_ty` might have vars of its own | 711 | // mind here that `self_ty` might have vars of its own |
712 | let vars = Substitution::build_for_def(db, impl_id) | 712 | let vars = TyBuilder::subst_for_def(db, impl_id) |
713 | .fill_with_bound_vars(DebruijnIndex::INNERMOST, self_ty.binders.len(&Interner)) | 713 | .fill_with_bound_vars(DebruijnIndex::INNERMOST, self_ty.binders.len(&Interner)) |
714 | .build(); | 714 | .build(); |
715 | let self_ty_with_vars = db.impl_self_ty(impl_id).subst(&vars); | 715 | let self_ty_with_vars = db.impl_self_ty(impl_id).subst(&vars); |
@@ -760,13 +760,13 @@ fn transform_receiver_ty( | |||
760 | self_ty: &Canonical<Ty>, | 760 | self_ty: &Canonical<Ty>, |
761 | ) -> Option<Ty> { | 761 | ) -> Option<Ty> { |
762 | let substs = match function_id.lookup(db.upcast()).container { | 762 | let substs = match function_id.lookup(db.upcast()).container { |
763 | AssocContainerId::TraitId(_) => Substitution::build_for_def(db, function_id) | 763 | AssocContainerId::TraitId(_) => TyBuilder::subst_for_def(db, function_id) |
764 | .push(self_ty.value.clone()) | 764 | .push(self_ty.value.clone()) |
765 | .fill_with_unknown() | 765 | .fill_with_unknown() |
766 | .build(), | 766 | .build(), |
767 | AssocContainerId::ImplId(impl_id) => { | 767 | AssocContainerId::ImplId(impl_id) => { |
768 | let impl_substs = inherent_impl_substs(db, impl_id, &self_ty)?; | 768 | let impl_substs = inherent_impl_substs(db, impl_id, &self_ty)?; |
769 | Substitution::build_for_def(db, function_id) | 769 | TyBuilder::subst_for_def(db, function_id) |
770 | .use_parent_substs(&impl_substs) | 770 | .use_parent_substs(&impl_substs) |
771 | .fill_with_unknown() | 771 | .fill_with_unknown() |
772 | .build() | 772 | .build() |