From 78f3b0627cf4a5d34aaf63c7b5a2e1b744a11b14 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 22 Nov 2019 17:10:51 +0300 Subject: Move FunctionData to hir_def --- crates/ra_ide_api/src/completion/complete_dot.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs') diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index 4e2c497e1..5a3f9b5f6 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs @@ -59,8 +59,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) { let mut seen_methods = FxHashSet::default(); ctx.analyzer.iterate_method_candidates(ctx.db, receiver, None, |_ty, func| { - let data = func.data(ctx.db); - if data.has_self_param() && seen_methods.insert(data.name().clone()) { + if func.has_self_param(ctx.db) && seen_methods.insert(func.name(ctx.db)) { acc.add_function(ctx, func); } None::<()> -- cgit v1.2.3