diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index a5567a78f..0084b24dc 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -118,11 +118,11 @@ impl Ty { | |||
118 | // TODO: cache this as a query? | 118 | // TODO: cache this as a query? |
119 | // - if so, what signature? (TyFingerprint, Name)? | 119 | // - if so, what signature? (TyFingerprint, Name)? |
120 | // - or maybe cache all names and def_ids of methods per fingerprint? | 120 | // - or maybe cache all names and def_ids of methods per fingerprint? |
121 | pub fn lookup_method(self, db: &impl HirDatabase, name: &Name) -> Option<DefId> { | 121 | pub fn lookup_method(self, db: &impl HirDatabase, name: &Name) -> Option<Function> { |
122 | self.iterate_methods(db, |f| { | 122 | self.iterate_methods(db, |f| { |
123 | let sig = f.signature(db); | 123 | let sig = f.signature(db); |
124 | if sig.name() == name && sig.has_self_param() { | 124 | if sig.name() == name && sig.has_self_param() { |
125 | Some(f.def_id()) | 125 | Some(f) |
126 | } else { | 126 | } else { |
127 | None | 127 | None |
128 | } | 128 | } |