aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/module.rs')
-rw-r--r--crates/ra_hir/src/module.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/module.rs b/crates/ra_hir/src/module.rs
index b9821115c..f0b673908 100644
--- a/crates/ra_hir/src/module.rs
+++ b/crates/ra_hir/src/module.rs
@@ -224,7 +224,7 @@ impl ModuleTree {
224/// `ModuleSource` is the syntax tree element that produced this module: 224/// `ModuleSource` is the syntax tree element that produced this module:
225/// either a file, or an inlinde module. 225/// either a file, or an inlinde module.
226#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 226#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
227pub struct ModuleSource(SourceItemId); 227pub struct ModuleSource(pub(crate) SourceItemId);
228 228
229/// An owned syntax node for a module. Unlike `ModuleSource`, 229/// An owned syntax node for a module. Unlike `ModuleSource`,
230/// this holds onto the AST for the whole file. 230/// this holds onto the AST for the whole file.
@@ -255,12 +255,12 @@ impl ModuleId {
255 let link = self.parent_link(tree)?; 255 let link = self.parent_link(tree)?;
256 Some(tree.links[link].owner) 256 Some(tree.links[link].owner)
257 } 257 }
258 fn crate_root(self, tree: &ModuleTree) -> ModuleId { 258 pub(crate) fn crate_root(self, tree: &ModuleTree) -> ModuleId {
259 generate(Some(self), move |it| it.parent(tree)) 259 generate(Some(self), move |it| it.parent(tree))
260 .last() 260 .last()
261 .unwrap() 261 .unwrap()
262 } 262 }
263 fn child(self, tree: &ModuleTree, name: &Name) -> Option<ModuleId> { 263 pub(crate) fn child(self, tree: &ModuleTree, name: &Name) -> Option<ModuleId> {
264 let link = tree.mods[self] 264 let link = tree.mods[self]
265 .children 265 .children
266 .iter() 266 .iter()