From ff0312fa32715ce42f134fd9f049c4df5956d042 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Jul 2020 13:00:56 +0200 Subject: Semantical call info --- crates/ra_ide/src/completion/presentation.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_ide/src/completion/presentation.rs') diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 64349dcb8..e6b4737aa 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs @@ -329,15 +329,10 @@ pub(crate) fn compute_score( ty: &Type, name: &str, ) -> Option { - // FIXME: this should not fall back to string equality. - let ty = &ty.display(ctx.db).to_string(); let (active_name, active_type) = if let Some(record_field) = &ctx.record_field_syntax { mark::hit!(record_field_type_match); let (struct_field, _local) = ctx.sema.resolve_record_field(record_field)?; - ( - struct_field.name(ctx.db).to_string(), - struct_field.signature_ty(ctx.db).display(ctx.db).to_string(), - ) + (struct_field.name(ctx.db).to_string(), struct_field.signature_ty(ctx.db)) } else if let Some(active_parameter) = &ctx.active_parameter { mark::hit!(active_param_type_match); (active_parameter.name.clone(), active_parameter.ty.clone()) -- cgit v1.2.3 From 29832b8c3db509dea8da9164e980ccac4bccf47d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Jul 2020 18:07:53 +0200 Subject: Reduce visibility --- crates/ra_ide/src/completion/presentation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src/completion/presentation.rs') diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index e6b4737aa..e29b82017 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs @@ -11,7 +11,7 @@ use crate::{ completion_item::Builder, CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions, }, - display::{const_label, macro_label, type_label, FunctionSignature}, + display::{const_label, function_signature::FunctionSignature, macro_label, type_label}, CompletionScore, RootDatabase, }; -- cgit v1.2.3