aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/imp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r--crates/ra_analysis/src/imp.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index 347d44638..b16edb969 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -20,7 +20,7 @@ use crate::{
20 completion::{completions, CompletionItem}, 20 completion::{completions, CompletionItem},
21 db::{self, FileSyntaxQuery, SyntaxDatabase}, 21 db::{self, FileSyntaxQuery, SyntaxDatabase},
22 hir::{ 22 hir::{
23 FnDescriptor, FunctionDescriptor, ModuleDescriptor, 23 FunctionDescriptor, FnSignatureInfo, ModuleDescriptor,
24 Problem, 24 Problem,
25 DeclarationDescriptor, 25 DeclarationDescriptor,
26 }, 26 },
@@ -445,7 +445,7 @@ impl AnalysisImpl {
445 pub fn resolve_callable( 445 pub fn resolve_callable(
446 &self, 446 &self,
447 position: FilePosition, 447 position: FilePosition,
448 ) -> Cancelable<Option<(FnDescriptor, Option<usize>)>> { 448 ) -> Cancelable<Option<(FnSignatureInfo, Option<usize>)>> {
449 let file = self.db.file_syntax(position.file_id); 449 let file = self.db.file_syntax(position.file_id);
450 let syntax = file.syntax(); 450 let syntax = file.syntax();
451 451
@@ -455,11 +455,13 @@ impl AnalysisImpl {
455 455
456 // Resolve the function's NameRef (NOTE: this isn't entirely accurate). 456 // Resolve the function's NameRef (NOTE: this isn't entirely accurate).
457 let file_symbols = self.index_resolve(name_ref)?; 457 let file_symbols = self.index_resolve(name_ref)?;
458 for (fn_fiel_id, fs) in file_symbols { 458 for (fn_file_id, fs) in file_symbols {
459 if fs.kind == FN_DEF { 459 if fs.kind == FN_DEF {
460 let fn_file = self.db.file_syntax(fn_fiel_id); 460 let fn_file = self.db.file_syntax(fn_file_id);
461 if let Some(fn_def) = find_node_at_offset(fn_file.syntax(), fs.node_range.start()) { 461 if let Some(fn_def) = find_node_at_offset(fn_file.syntax(), fs.node_range.start()) {
462 if let Some(descriptor) = FnDescriptor::new(fn_def) { 462 let descr =
463 FunctionDescriptor::guess_from_source(&*self.db, fn_file_id, fn_def);
464 if let Some(descriptor) = descr.signature_info(&*self.db) {
463 // If we have a calling expression let's find which argument we are on 465 // If we have a calling expression let's find which argument we are on
464 let mut current_parameter = None; 466 let mut current_parameter = None;
465 467