From 0caec7d250affd042e51d035fb6d86c0f7f25f94 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Jun 2019 20:07:35 +0300 Subject: rename XSignature -> XData --- crates/ra_ide_api/src/call_info.rs | 2 +- crates/ra_ide_api/src/completion/complete_dot.rs | 4 ++-- crates/ra_ide_api/src/completion/complete_path.rs | 4 ++-- crates/ra_ide_api/src/completion/presentation.rs | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index bd08e183d..2948c646b 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs @@ -35,7 +35,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 99da24142..c14af593b 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -49,8 +49,8 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { ty.iterate_impl_items(ctx.db, krate, |item| { match item { hir::ImplItem::Method(func) => { - let sig = func.signature(ctx.db); - if !sig.has_self_param() { + let data = func.data(ctx.db); + if !data.has_self_param() { acc.add_function(ctx, func); } } diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index f4ff4404b..973936736 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs @@ -98,13 +98,13 @@ impl Completions { name: Option, func: hir::Function, ) { - let sig = func.signature(ctx.db); - let name = name.unwrap_or_else(|| sig.name().to_string()); + let data = func.data(ctx.db); + let name = name.unwrap_or_else(|| data.name().to_string()); let ast_node = func.source(ctx.db).ast; let detail = function_label(&ast_node); let mut builder = CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name) - .kind(if sig.has_self_param() { + .kind(if data.has_self_param() { CompletionItemKind::Method } else { CompletionItemKind::Function @@ -115,10 +115,10 @@ impl Completions { if ctx.use_item_syntax.is_none() && !ctx.is_call { tested_by!(inserts_parens_for_function_calls); let snippet = - if sig.params().is_empty() || sig.has_self_param() && sig.params().len() == 1 { - format!("{}()$0", sig.name()) + if data.params().is_empty() || data.has_self_param() && data.params().len() == 1 { + format!("{}()$0", data.name()) } else { - format!("{}($0)", sig.name()) + format!("{}($0)", data.name()) }; builder = builder.insert_snippet(snippet); } -- cgit v1.2.3