diff options
Diffstat (limited to 'crates/ra_analysis/src/descriptors/module/mod.rs')
-rw-r--r-- | crates/ra_analysis/src/descriptors/module/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/descriptors/module/mod.rs b/crates/ra_analysis/src/descriptors/module/mod.rs index 95d9bcc27..cfdffcdbc 100644 --- a/crates/ra_analysis/src/descriptors/module/mod.rs +++ b/crates/ra_analysis/src/descriptors/module/mod.rs | |||
@@ -1,5 +1,4 @@ | |||
1 | pub(super) mod imp; | 1 | pub(super) mod imp; |
2 | mod scope; | ||
3 | pub(super) mod nameres; | 2 | pub(super) mod nameres; |
4 | 3 | ||
5 | use std::sync::Arc; | 4 | use std::sync::Arc; |
@@ -19,7 +18,7 @@ use crate::{ | |||
19 | input::SourceRootId | 18 | input::SourceRootId |
20 | }; | 19 | }; |
21 | 20 | ||
22 | pub(crate) use self::scope::ModuleScope; | 21 | pub(crate) use self::{nameres::ModuleScope}; |
23 | 22 | ||
24 | /// `ModuleDescriptor` is API entry point to get all the information | 23 | /// `ModuleDescriptor` is API entry point to get all the information |
25 | /// about a particular module. | 24 | /// about a particular module. |
@@ -126,8 +125,10 @@ impl ModuleDescriptor { | |||
126 | } | 125 | } |
127 | 126 | ||
128 | /// Returns a `ModuleScope`: a set of items, visible in this module. | 127 | /// Returns a `ModuleScope`: a set of items, visible in this module. |
129 | pub fn scope(&self, db: &impl DescriptorDatabase) -> Cancelable<Arc<ModuleScope>> { | 128 | pub(crate) fn scope(&self, db: &impl DescriptorDatabase) -> Cancelable<ModuleScope> { |
130 | db._module_scope(self.source_root_id, self.module_id) | 129 | let item_map = db._item_map(self.source_root_id)?; |
130 | let res = item_map.per_module[&self.module_id].clone(); | ||
131 | Ok(res) | ||
131 | } | 132 | } |
132 | 133 | ||
133 | pub fn problems(&self, db: &impl DescriptorDatabase) -> Vec<(SyntaxNode, Problem)> { | 134 | pub fn problems(&self, db: &impl DescriptorDatabase) -> Vec<(SyntaxNode, Problem)> { |