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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index c15873328..83a0dc445 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -207,7 +207,7 @@ impl AnalysisImpl {
207 let syntax = file.syntax(); 207 let syntax = file.syntax();
208 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) { 208 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) {
209 // First try to resolve the symbol locally 209 // First try to resolve the symbol locally
210 return if let Some((name, range)) = resolve_local_name(&file, offset, name_ref) { 210 return if let Some((name, range)) = resolve_local_name(name_ref) {
211 let mut vec = vec![]; 211 let mut vec = vec![];
212 vec.push(( 212 vec.push((
213 file_id, 213 file_id,
@@ -262,7 +262,7 @@ impl AnalysisImpl {
262 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) { 262 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) {
263 263
264 // We are only handing local references for now 264 // We are only handing local references for now
265 if let Some(resolved) = resolve_local_name(&file, offset, name_ref) { 265 if let Some(resolved) = resolve_local_name(name_ref) {
266 266
267 ret.push((file_id, resolved.1)); 267 ret.push((file_id, resolved.1));
268 268
@@ -270,7 +270,7 @@ impl AnalysisImpl {
270 270
271 let refs : Vec<_> = fn_def.syntax().descendants() 271 let refs : Vec<_> = fn_def.syntax().descendants()
272 .filter_map(ast::NameRef::cast) 272 .filter_map(ast::NameRef::cast)
273 .filter(|n: &ast::NameRef| resolve_local_name(&file, n.syntax().range().start(), *n) == Some(resolved.clone())) 273 .filter(|&n: &ast::NameRef| resolve_local_name(n) == Some(resolved.clone()))
274 .collect(); 274 .collect();
275 275
276 for r in refs { 276 for r in refs {