From b35c306b657c25f676c3981e2c78ea73f44ef378 Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Fri, 2 Dec 2016 23:10:44 +0000 Subject: [PATCH] Fix the path resolutions of glob imports. --- src/librustc_resolve/resolve_imports.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index 890891fd090..64a8e21f9e0 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -708,10 +708,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> { } // Record the destination of this import - if let Some(did) = module.def_id() { - let resolution = PathResolution::new(Def::Mod(did)); - self.def_map.insert(directive.id, resolution); - } + self.def_map.insert(directive.id, PathResolution::new(module.def().unwrap())); } // Miscellaneous post-processing, including recording reexports, reporting conflicts,