diff options
author | Florian Diebold <[email protected]> | 2021-04-05 17:49:26 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 18:21:01 +0100 |
commit | 30a339e038bfd94d8c91f79287be9b7db4f0cb4e (patch) | |
tree | 7e026ded541b94f2908d61a8037ed62f2df91625 /crates/hir_ty/src/method_resolution.rs | |
parent | 05eba0db3dd76f016aabdd49af6211e70a1812ed (diff) |
Add Interner parameter to Binders::substitute
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index 88750acf3..19a1fa793 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -712,7 +712,7 @@ pub(crate) fn inherent_impl_substs( | |||
712 | let vars = TyBuilder::subst_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).substitute(&vars); | 715 | let self_ty_with_vars = db.impl_self_ty(impl_id).substitute(&Interner, &vars); |
716 | let mut kinds = self_ty.binders.interned().to_vec(); | 716 | let mut kinds = self_ty.binders.interned().to_vec(); |
717 | kinds.extend( | 717 | kinds.extend( |
718 | iter::repeat(chalk_ir::WithKind::new( | 718 | iter::repeat(chalk_ir::WithKind::new( |
@@ -774,7 +774,7 @@ fn transform_receiver_ty( | |||
774 | AssocContainerId::ModuleId(_) => unreachable!(), | 774 | AssocContainerId::ModuleId(_) => unreachable!(), |
775 | }; | 775 | }; |
776 | let sig = db.callable_item_signature(function_id.into()); | 776 | let sig = db.callable_item_signature(function_id.into()); |
777 | Some(sig.map(|s| s.params()[0].clone()).substitute(&substs)) | 777 | Some(sig.map(|s| s.params()[0].clone()).substitute(&Interner, &substs)) |
778 | } | 778 | } |
779 | 779 | ||
780 | pub fn implements_trait( | 780 | pub fn implements_trait( |