From 828bd73195a43dfba2837812c070880914001e8f Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Sat, 6 Oct 2018 12:02:15 -0400 Subject: Resolve local names first --- crates/ra_analysis/src/imp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_analysis') diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 05c91fb83..517867e86 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs @@ -199,11 +199,11 @@ impl AnalysisImpl { if let Some(name_ref) = find_node_at_offset::(syntax, offset) { // First try to resolve the symbol locally - if let Some(name) = resolve_local_name(&file, offset, name_ref) { - let vec: Vec<(FileId, FileSymbol)>::new(); + if let Some((name, range)) = resolve_local_name(&file, offset, name_ref) { + let mut vec = vec![]; vec.push((file_id, FileSymbol { - name: name.text(), - node_range: name.syntax().range(), + name, + node_range: range, kind : NAME })); -- cgit v1.2.3