Skip to content

Commit 9189463

Browse files
committed
Fix regression from #31461 and fix the test that was supposed to catch it.
1 parent 1de70d3 commit 9189463

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/librustc_resolve/resolve_imports.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
524524
build_reduced_graph::populate_module_if_necessary(self.resolver, target_module);
525525
target_module.for_each_child(|name, ns, binding| {
526526
if !binding.defined_with(DefModifiers::IMPORTABLE | DefModifiers::PUBLIC) { return }
527+
if binding.is_extern_crate() { return }
527528
self.define(module_, name, ns, directive.import(binding));
528529

529530
if ns == TypeNS && directive.is_public &&

src/test/compile-fail/no-extern-crate-in-glob-import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
extern crate core;
1515

1616
mod T {
17-
use super::*;
17+
pub use super::*;
1818
}
1919

2020
fn main() {

0 commit comments

Comments
 (0)