diff options
Diffstat (limited to 'crates/ra_hir/src/ty/method_resolution.rs')
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 64adb814d..f84aae26e 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -291,9 +291,9 @@ fn is_valid_candidate( | |||
291 | ) -> bool { | 291 | ) -> bool { |
292 | match item { | 292 | match item { |
293 | AssocItem::Function(m) => { | 293 | AssocItem::Function(m) => { |
294 | let data = m.data(db); | 294 | let data = db.function_data(m.id); |
295 | name.map_or(true, |name| data.name() == name) | 295 | name.map_or(true, |name| data.name == *name) |
296 | && (data.has_self_param() || mode == LookupMode::Path) | 296 | && (data.has_self_param || mode == LookupMode::Path) |
297 | } | 297 | } |
298 | AssocItem::Const(c) => { | 298 | AssocItem::Const(c) => { |
299 | name.map_or(true, |name| Some(name) == c.name(db).as_ref()) | 299 | name.map_or(true, |name| Some(name) == c.name(db).as_ref()) |