aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/lower.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/nameres/lower.rs b/crates/ra_hir/src/nameres/lower.rs
index 9a45fa61c..df87f520f 100644
--- a/crates/ra_hir/src/nameres/lower.rs
+++ b/crates/ra_hir/src/nameres/lower.rs
@@ -21,6 +21,7 @@ impl_arena_id!(ImportId);
21#[derive(Debug, PartialEq, Eq)] 21#[derive(Debug, PartialEq, Eq)]
22pub(super) struct ImportData { 22pub(super) struct ImportData {
23 pub(super) path: Path, 23 pub(super) path: Path,
24 pub(super) alias: Option<Name>,
24 pub(super) is_glob: bool, 25 pub(super) is_glob: bool,
25} 26}
26 27
@@ -209,9 +210,10 @@ impl LoweredModule {
209 } 210 }
210 211
211 fn add_use_item(&mut self, source_map: &mut ImportSourceMap, item: &ast::UseItem) { 212 fn add_use_item(&mut self, source_map: &mut ImportSourceMap, item: &ast::UseItem) {
212 Path::expand_use_item(item, |path, segment| { 213 Path::expand_use_item(item, |path, segment, alias| {
213 let import = self.imports.alloc(ImportData { 214 let import = self.imports.alloc(ImportData {
214 path, 215 path,
216 alias,
215 is_glob: segment.is_none(), 217 is_glob: segment.is_none(),
216 }); 218 });
217 if let Some(segment) = segment { 219 if let Some(segment) = segment {