mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
hide some scopes
This commit is contained in:
parent
58fe5598e7
commit
3aae223d93
4 changed files with 28 additions and 23 deletions
|
@ -173,7 +173,10 @@ impl ScopesWithSourceMap {
|
|||
.unwrap_or(original_scope)
|
||||
}
|
||||
|
||||
pub fn resolve_local_name(&self, name_ref: &ast::NameRef) -> Option<ScopeEntryWithSyntax> {
|
||||
pub(crate) fn resolve_local_name(
|
||||
&self,
|
||||
name_ref: &ast::NameRef,
|
||||
) -> Option<ScopeEntryWithSyntax> {
|
||||
let mut shadowed = FxHashSet::default();
|
||||
let name = name_ref.as_name();
|
||||
let ret = self
|
||||
|
@ -190,7 +193,7 @@ impl ScopesWithSourceMap {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
|
||||
pub(crate) fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
|
||||
let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
|
||||
let ptr = Either::A(AstPtr::new(pat.into()));
|
||||
fn_def
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue