diff options
author | Aleksey Kladov <[email protected]> | 2019-01-24 12:28:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-24 12:28:50 +0000 |
commit | ec7ed054e06cb2e23fd3911932766b32014c8fa1 (patch) | |
tree | c06ed85f44afc261c483ff7b87e1a7aa33c198a1 /crates/ra_hir/src/ty | |
parent | f1959bbae0cf2f99e63d074278cec165c274b4e5 (diff) |
Functions use new id scheme
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 | } |