diff options
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index a9be9fbdb..dcec51a10 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -110,7 +110,7 @@ impl ExprScopes { | |||
110 | #[derive(Debug, Clone, PartialEq, Eq)] | 110 | #[derive(Debug, Clone, PartialEq, Eq)] |
111 | pub struct ScopesWithSourceMap { | 111 | pub struct ScopesWithSourceMap { |
112 | pub(crate) source_map: Arc<BodySourceMap>, | 112 | pub(crate) source_map: Arc<BodySourceMap>, |
113 | pub scopes: Arc<ExprScopes>, | 113 | pub(crate) scopes: Arc<ExprScopes>, |
114 | } | 114 | } |
115 | 115 | ||
116 | #[derive(Debug, Clone, PartialEq, Eq)] | 116 | #[derive(Debug, Clone, PartialEq, Eq)] |
@@ -134,7 +134,7 @@ impl ScopesWithSourceMap { | |||
134 | generate(self.scope_for(node), move |&scope| self.scopes.scopes[scope].parent) | 134 | generate(self.scope_for(node), move |&scope| self.scopes.scopes[scope].parent) |
135 | } | 135 | } |
136 | 136 | ||
137 | pub fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> { | 137 | pub(crate) fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> { |
138 | self.scopes | 138 | self.scopes |
139 | .scope_for | 139 | .scope_for |
140 | .iter() | 140 | .iter() |
@@ -211,7 +211,7 @@ impl ScopesWithSourceMap { | |||
211 | .collect() | 211 | .collect() |
212 | } | 212 | } |
213 | 213 | ||
214 | pub fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> { | 214 | pub(crate) fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> { |
215 | node.ancestors() | 215 | node.ancestors() |
216 | .map(SyntaxNodePtr::new) | 216 | .map(SyntaxNodePtr::new) |
217 | .filter_map(|ptr| self.source_map.syntax_expr(ptr)) | 217 | .filter_map(|ptr| self.source_map.syntax_expr(ptr)) |