aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r--crates/ra_ide/src/completion/complete_trait_impl.rs4
-rw-r--r--crates/ra_ide/src/completion/presentation.rs5
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs
index 05e605670..cf716540f 100644
--- a/crates/ra_ide/src/completion/complete_trait_impl.rs
+++ b/crates/ra_ide/src/completion/complete_trait_impl.rs
@@ -43,7 +43,7 @@ use crate::{
43 completion::{ 43 completion::{
44 CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions, 44 CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions,
45 }, 45 },
46 display::function_label, 46 display::function_declaration,
47}; 47};
48 48
49pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) { 49pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) {
@@ -144,7 +144,7 @@ fn add_function_impl(
144 }; 144 };
145 let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end()); 145 let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end());
146 146
147 let function_decl = function_label(&func.source(ctx.db).value); 147 let function_decl = function_declaration(&func.source(ctx.db).value);
148 match ctx.config.snippet_cap { 148 match ctx.config.snippet_cap {
149 Some(cap) => { 149 Some(cap) => {
150 let snippet = format!("{} {{\n $0\n}}", function_decl); 150 let snippet = format!("{} {{\n $0\n}}", function_decl);
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs
index 160f2f319..6aab93e17 100644
--- a/crates/ra_ide/src/completion/presentation.rs
+++ b/crates/ra_ide/src/completion/presentation.rs
@@ -12,7 +12,8 @@ use crate::{
12 CompletionKind, Completions, 12 CompletionKind, Completions,
13 }, 13 },
14 display::{ 14 display::{
15 const_label, function_label, function_signature::FunctionSignature, macro_label, type_label, 15 const_label, function_declaration, function_signature::FunctionSignature, macro_label,
16 type_label,
16 }, 17 },
17 CompletionScore, RootDatabase, 18 CompletionScore, RootDatabase,
18}; 19};
@@ -208,7 +209,7 @@ impl Completions {
208 }) 209 })
209 .set_documentation(func.docs(ctx.db)) 210 .set_documentation(func.docs(ctx.db))
210 .set_deprecated(is_deprecated(func, ctx.db)) 211 .set_deprecated(is_deprecated(func, ctx.db))
211 .detail(function_label(&ast_node)); 212 .detail(function_declaration(&ast_node));
212 213
213 let params = function_signature 214 let params = function_signature
214 .parameter_names 215 .parameter_names