mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
make stuff private
This commit is contained in:
parent
cec67b2b65
commit
30481808fb
1 changed files with 3 additions and 3 deletions
|
@ -110,7 +110,7 @@ impl ExprScopes {
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ScopesWithSourceMap {
|
||||
pub(crate) source_map: Arc<BodySourceMap>,
|
||||
pub scopes: Arc<ExprScopes>,
|
||||
pub(crate) scopes: Arc<ExprScopes>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -134,7 +134,7 @@ impl ScopesWithSourceMap {
|
|||
generate(self.scope_for(node), move |&scope| self.scopes.scopes[scope].parent)
|
||||
}
|
||||
|
||||
pub fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> {
|
||||
pub(crate) fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> {
|
||||
self.scopes
|
||||
.scope_for
|
||||
.iter()
|
||||
|
@ -211,7 +211,7 @@ impl ScopesWithSourceMap {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> {
|
||||
pub(crate) fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> {
|
||||
node.ancestors()
|
||||
.map(SyntaxNodePtr::new)
|
||||
.filter_map(|ptr| self.source_map.syntax_expr(ptr))
|
||||
|
|
Loading…
Reference in a new issue