aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr
diff options
context:
space:
mode:
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