aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/source_binder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 59046edcc..c1ecf18b9 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -285,7 +285,7 @@ impl SourceAnalyzer {
285 self.resolve_hir_path(db, &hir_path) 285 self.resolve_hir_path(db, &hir_path)
286 } 286 }
287 287
288 pub fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option<ScopeEntryWithSyntax> { 288 fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option<ScopeEntryWithSyntax> {
289 let mut shadowed = FxHashSet::default(); 289 let mut shadowed = FxHashSet::default();
290 let name = name_ref.as_name(); 290 let name = name_ref.as_name();
291 let source_map = self.body_source_map.as_ref()?; 291 let source_map = self.body_source_map.as_ref()?;
@@ -309,9 +309,9 @@ impl SourceAnalyzer {
309 self.resolver.process_all_names(db, f) 309 self.resolver.process_all_names(db, f)
310 } 310 }
311 311
312 // FIXME: we only use this in `inline_local_variable` assist, ideally, we
313 // should switch to general reference search infra there.
312 pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> { 314 pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
313 // FIXME: at least, this should work with any DefWithBody, but ideally
314 // this should be hir-based altogether
315 let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); 315 let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
316 let ptr = Either::A(AstPtr::new(&ast::Pat::from(pat.clone()))); 316 let ptr = Either::A(AstPtr::new(&ast::Pat::from(pat.clone())));
317 fn_def 317 fn_def