aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-10-06 17:02:15 +0100
committerJeremy A. Kolb <[email protected]>2018-10-06 17:02:15 +0100
commit828bd73195a43dfba2837812c070880914001e8f (patch)
tree0de1dc7603e1a50acc71041d1092e120cb565f35 /crates/ra_analysis
parent1d4c767879913271bf01912f12c7f8f176c7755d (diff)
Resolve local names first
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r--crates/ra_analysis/src/imp.rs8
1 files changed, 4 insertions, 4 deletions
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 {
199 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) { 199 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) {
200 200
201 // First try to resolve the symbol locally 201 // First try to resolve the symbol locally
202 if let Some(name) = resolve_local_name(&file, offset, name_ref) { 202 if let Some((name, range)) = resolve_local_name(&file, offset, name_ref) {
203 let vec: Vec<(FileId, FileSymbol)>::new(); 203 let mut vec = vec![];
204 vec.push((file_id, FileSymbol { 204 vec.push((file_id, FileSymbol {
205 name: name.text(), 205 name,
206 node_range: name.syntax().range(), 206 node_range: range,
207 kind : NAME 207 kind : NAME
208 })); 208 }));
209 209