]> git.lizzy.rs Git - rust.git/commitdiff
Fix regression from #31461 and fix the test that was supposed to catch it.
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Thu, 11 Feb 2016 07:18:41 +0000 (07:18 +0000)
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Thu, 11 Feb 2016 07:27:12 +0000 (07:27 +0000)
src/librustc_resolve/resolve_imports.rs
src/test/compile-fail/no-extern-crate-in-glob-import.rs

index 6667e48987087cc8b0e20a82474b99523a4ae751..dc9692af1ea83009ddc623ee1e15e73c31cd46fe 100644 (file)
@@ -524,6 +524,7 @@ fn resolve_glob_import(&mut self,
         build_reduced_graph::populate_module_if_necessary(self.resolver, target_module);
         target_module.for_each_child(|name, ns, binding| {
             if !binding.defined_with(DefModifiers::IMPORTABLE | DefModifiers::PUBLIC) { return }
+            if binding.is_extern_crate() { return }
             self.define(module_, name, ns, directive.import(binding));
 
             if ns == TypeNS && directive.is_public &&
index 5d3efd85134ad6e5e899a91816ea751cff84e62f..75882c5e9812911d0338cc1e2c7f5d3feaecb027 100644 (file)
@@ -14,7 +14,7 @@
 extern crate core;
 
 mod T {
-    use super::*;
+    pub use super::*;
 }
 
 fn main() {