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_path.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide_api/src/completion/complete_path.rs') diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 5d974cf6d..802c7701a 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -53,8 +53,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { ctx.analyzer.iterate_path_candidates(ctx.db, ty.clone(), None, |_ty, item| { match item { hir::AssocItem::Function(func) => { - let data = func.data(ctx.db); - if !data.has_self_param() { + if !func.has_self_param(ctx.db) { acc.add_function(ctx, func); } } @@ -80,8 +79,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { for item in t.items(ctx.db) { match item { hir::AssocItem::Function(func) => { - let data = func.data(ctx.db); - if !data.has_self_param() { + if !func.has_self_param(ctx.db) { acc.add_function(ctx, func); } } -- cgit v1.2.3