From 9167da66acff22b4fe68d7bbe60c25ab0b56ad72 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 15 Nov 2019 14:15:04 +0300 Subject: Reduce visibility --- crates/ra_hir/src/source_binder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') 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 { self.resolve_hir_path(db, &hir_path) } - pub fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option { + fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option { let mut shadowed = FxHashSet::default(); let name = name_ref.as_name(); let source_map = self.body_source_map.as_ref()?; @@ -309,9 +309,9 @@ impl SourceAnalyzer { self.resolver.process_all_names(db, f) } + // FIXME: we only use this in `inline_local_variable` assist, ideally, we + // should switch to general reference search infra there. pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec { - // FIXME: at least, this should work with any DefWithBody, but ideally - // this should be hir-based altogether let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); let ptr = Either::A(AstPtr::new(&ast::Pat::from(pat.clone()))); fn_def -- cgit v1.2.3