aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/method_resolution.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/method_resolution.rs')
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index ad26d591c..46ec136bd 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -192,8 +192,8 @@ fn iterate_trait_method_candidates<T>(
192 let mut known_implemented = false; 192 let mut known_implemented = false;
193 for item in data.items() { 193 for item in data.items() {
194 if let TraitItem::Function(m) = *item { 194 if let TraitItem::Function(m) = *item {
195 let sig = m.signature(db); 195 let data = m.data(db);
196 if name.map_or(true, |name| sig.name() == name) && sig.has_self_param() { 196 if name.map_or(true, |name| data.name() == name) && data.has_self_param() {
197 if !known_implemented { 197 if !known_implemented {
198 let trait_ref = canonical_trait_ref(db, t, ty.clone()); 198 let trait_ref = canonical_trait_ref(db, t, ty.clone());
199 if db.implements(krate, trait_ref).is_none() { 199 if db.implements(krate, trait_ref).is_none() {
@@ -227,8 +227,8 @@ fn iterate_inherent_methods<T>(
227 for impl_block in impls.lookup_impl_blocks(&ty.value) { 227 for impl_block in impls.lookup_impl_blocks(&ty.value) {
228 for item in impl_block.items(db) { 228 for item in impl_block.items(db) {
229 if let ImplItem::Method(f) = item { 229 if let ImplItem::Method(f) = item {
230 let sig = f.signature(db); 230 let data = f.data(db);
231 if name.map_or(true, |name| sig.name() == name) && sig.has_self_param() { 231 if name.map_or(true, |name| data.name() == name) && data.has_self_param() {
232 if let Some(result) = callback(&ty.value, f) { 232 if let Some(result) = callback(&ty.value, f) {
233 return Some(result); 233 return Some(result);
234 } 234 }