aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-13 07:31:03 +0100
committerAleksey Kladov <[email protected]>2019-04-13 07:31:03 +0100
commit3aae223d938e5a36d997c45a0f86cfcabf83b570 (patch)
tree354c1e3c3a5e07b233c4e8490225f9be720a3315 /crates/ra_hir/src/expr
parent58fe5598e70eef6edf109865cb87b806b22536fb (diff)
hide some scopes
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r--crates/ra_hir/src/expr/scope.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs
index 404c979eb..a9be9fbdb 100644
--- a/crates/ra_hir/src/expr/scope.rs
+++ b/crates/ra_hir/src/expr/scope.rs
@@ -173,7 +173,10 @@ impl ScopesWithSourceMap {
173 .unwrap_or(original_scope) 173 .unwrap_or(original_scope)
174 } 174 }
175 175
176 pub fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option<ScopeEntryWithSyntax> { 176 pub(crate) fn resolve_local_name(
177 &self,
178 name_ref: &ast::NameRef,
179 ) -> Option<ScopeEntryWithSyntax> {
177 let mut shadowed = FxHashSet::default(); 180 let mut shadowed = FxHashSet::default();
178 let name = name_ref.as_name(); 181 let name = name_ref.as_name();
179 let ret = self 182 let ret = self
@@ -190,7 +193,7 @@ impl ScopesWithSourceMap {
190 }) 193 })
191 } 194 }
192 195
193 pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> { 196 pub(crate) fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
194 let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); 197 let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
195 let ptr = Either::A(AstPtr::new(pat.into())); 198 let ptr = Either::A(AstPtr::new(pat.into()));
196 fn_def 199 fn_def