mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
reduce visibility
This commit is contained in:
parent
1ec418c3b8
commit
3260639608
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ pub struct AstIdMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AstIdMap {
|
impl AstIdMap {
|
||||||
pub fn from_source(node: &SyntaxNode) -> AstIdMap {
|
pub(crate) fn from_source(node: &SyntaxNode) -> AstIdMap {
|
||||||
assert!(node.parent().is_none());
|
assert!(node.parent().is_none());
|
||||||
let mut res = AstIdMap { arena: Arena::default() };
|
let mut res = AstIdMap { arena: Arena::default() };
|
||||||
// By walking the tree in bread-first order we make sure that parents
|
// By walking the tree in bread-first order we make sure that parents
|
||||||
|
@ -83,7 +83,7 @@ impl AstIdMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> {
|
pub(crate) fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> {
|
||||||
self.arena[id.raw].cast::<N>().unwrap()
|
self.arena[id.raw].cast::<N>().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue