aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r--crates/ra_analysis/src/imp.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index 6c1a4749a..b24b5cfdc 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -438,9 +438,10 @@ impl AnalysisImpl {
438 438
439 // Resolve the function's NameRef (NOTE: this isn't entirely accurate). 439 // Resolve the function's NameRef (NOTE: this isn't entirely accurate).
440 let file_symbols = self.index_resolve(name_ref)?; 440 let file_symbols = self.index_resolve(name_ref)?;
441 for (_, fs) in file_symbols { 441 for (fn_fiel_id, fs) in file_symbols {
442 if fs.kind == FN_DEF { 442 if fs.kind == FN_DEF {
443 if let Some(fn_def) = find_node_at_offset(syntax, fs.node_range.start()) { 443 let fn_file = self.db.file_syntax(fn_fiel_id);
444 if let Some(fn_def) = find_node_at_offset(fn_file.syntax(), fs.node_range.start()) {
444 if let Some(descriptor) = FnDescriptor::new(fn_def) { 445 if let Some(descriptor) = FnDescriptor::new(fn_def) {
445 // If we have a calling expression let's find which argument we are on 446 // If we have a calling expression let's find which argument we are on
446 let mut current_parameter = None; 447 let mut current_parameter = None;