From 5a7fce4e4cd8846a49ce007910f72340007d9c8c Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 2 Feb 2019 00:18:10 +0100 Subject: Pass aliases to ImportData --- crates/ra_hir/src/nameres/lower.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/nameres') 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); #[derive(Debug, PartialEq, Eq)] pub(super) struct ImportData { pub(super) path: Path, + pub(super) alias: Option, pub(super) is_glob: bool, } @@ -209,9 +210,10 @@ impl LoweredModule { } fn add_use_item(&mut self, source_map: &mut ImportSourceMap, item: &ast::UseItem) { - Path::expand_use_item(item, |path, segment| { + Path::expand_use_item(item, |path, segment, alias| { let import = self.imports.alloc(ImportData { path, + alias, is_glob: segment.is_none(), }); if let Some(segment) = segment { -- cgit v1.2.3