aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_scope.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-25 17:05:16 +0000
committerFlorian Diebold <[email protected]>2019-12-26 15:23:40 +0000
commit21359c3ab5fc497d11b2c0f0435c7635336a726e (patch)
treead438e045f50be776a9245ceb367598e7b60f8f9 /crates/ra_hir_def/src/item_scope.rs
parent8ac25f119eb45d425370d9f7f093bc206e6c4a9f (diff)
Take visibility into account for glob imports
Diffstat (limited to 'crates/ra_hir_def/src/item_scope.rs')
-rw-r--r--crates/ra_hir_def/src/item_scope.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index d77f37f67..db5f469c7 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -149,16 +149,8 @@ impl ItemScope {
149 changed 149 changed
150 } 150 }
151 151
152 #[cfg(test)] 152 pub(crate) fn resolutions<'a>(&'a self) -> impl Iterator<Item = (Name, PerNs)> + 'a {
153 pub(crate) fn collect_resolutions(&self) -> Vec<(Name, PerNs)> { 153 self.visible.iter().map(|(name, res)| (name.clone(), res.clone()))
154 self.visible.iter().map(|(name, res)| (name.clone(), res.clone())).collect()
155 }
156
157 pub(crate) fn collect_resolutions_with_vis(
158 &self,
159 vis: ResolvedVisibility,
160 ) -> Vec<(Name, PerNs)> {
161 self.visible.iter().map(|(name, res)| (name.clone(), res.with_visibility(vis))).collect()
162 } 154 }
163 155
164 pub(crate) fn collect_legacy_macros(&self) -> FxHashMap<Name, MacroDefId> { 156 pub(crate) fn collect_legacy_macros(&self) -> FxHashMap<Name, MacroDefId> {