mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
make stuff private
This commit is contained in:
parent
cec67b2b65
commit
30481808fb
@ -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 New Issue
Block a user