diff options
author | Florian Diebold <[email protected]> | 2021-04-05 16:13:50 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 18:19:18 +0100 |
commit | 69714d36e6617800f3edea174f5d6f76c985ad4c (patch) | |
tree | e74b3e3ab442e4e2e36c3985de978ebbbccf7634 /crates/hir_ty/src/method_resolution.rs | |
parent | 6e9798a992b30b735f14018379e0861d2ec30647 (diff) |
Hide Binders internals more
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index 6ace970d1..ad5022808 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -102,11 +102,11 @@ impl TraitImpls { | |||
102 | for (_module_id, module_data) in crate_def_map.modules() { | 102 | for (_module_id, module_data) in crate_def_map.modules() { |
103 | for impl_id in module_data.scope.impls() { | 103 | for impl_id in module_data.scope.impls() { |
104 | let target_trait = match db.impl_trait(impl_id) { | 104 | let target_trait = match db.impl_trait(impl_id) { |
105 | Some(tr) => tr.value.hir_trait_id(), | 105 | Some(tr) => tr.skip_binders().hir_trait_id(), |
106 | None => continue, | 106 | None => continue, |
107 | }; | 107 | }; |
108 | let self_ty = db.impl_self_ty(impl_id); | 108 | let self_ty = db.impl_self_ty(impl_id); |
109 | let self_ty_fp = TyFingerprint::for_impl(&self_ty.value); | 109 | let self_ty_fp = TyFingerprint::for_impl(self_ty.skip_binders()); |
110 | impls | 110 | impls |
111 | .map | 111 | .map |
112 | .entry(target_trait) | 112 | .entry(target_trait) |
@@ -201,7 +201,7 @@ impl InherentImpls { | |||
201 | } | 201 | } |
202 | 202 | ||
203 | let self_ty = db.impl_self_ty(impl_id); | 203 | let self_ty = db.impl_self_ty(impl_id); |
204 | if let Some(fp) = TyFingerprint::for_impl(&self_ty.value) { | 204 | if let Some(fp) = TyFingerprint::for_impl(self_ty.skip_binders()) { |
205 | map.entry(fp).or_default().push(impl_id); | 205 | map.entry(fp).or_default().push(impl_id); |
206 | } | 206 | } |
207 | } | 207 | } |
@@ -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.value.params()[0].clone().subst_bound_vars(&substs)) | 777 | Some(sig.map(|s| s.params()[0].clone()).subst(&substs)) |
778 | } | 778 | } |
779 | 779 | ||
780 | pub fn implements_trait( | 780 | pub fn implements_trait( |