Skip to content

Commit d5321f2

Browse files
committed
Auto merge of #30133 - jseyfried:fix_regression, r=alexcrichton
r? @nikomatsakis
2 parents 01bd93d + 15b1f56 commit d5321f2

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

src/librustc_resolve/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1037,13 +1037,6 @@ impl NameBindings {
10371037
}
10381038
}
10391039

1040-
fn create_from_module(module: Rc<Module>) -> NameBindings {
1041-
NameBindings {
1042-
type_ns: NameBinding::create_from_module(module),
1043-
value_ns: NameBinding::new(),
1044-
}
1045-
}
1046-
10471040
/// Creates a new module in this set of name bindings.
10481041
fn define_module(&self, module: Rc<Module>, sp: Span) {
10491042
self.type_ns.set(NsDef::create_from_module(module, Some(sp)));

src/librustc_resolve/resolve_imports.rs

-9
Original file line numberDiff line numberDiff line change
@@ -853,15 +853,6 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
853853

854854
}
855855

856-
// Add external module children from the containing module.
857-
for (&name, module) in target_module.external_module_children.borrow().iter() {
858-
self.merge_import_resolution(module_,
859-
target_module.clone(),
860-
import_directive,
861-
name,
862-
NameBindings::create_from_module(module.clone()));
863-
}
864-
865856
// Record the destination of this import
866857
if let Some(did) = target_module.def_id() {
867858
self.resolver.def_map.borrow_mut().insert(id,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Check that extern crate declarations are excluded from glob imports.
12+
13+
#![feature(core)]
14+
extern crate core;
15+
16+
mod T {
17+
use super::*;
18+
}
19+
20+
fn main() {
21+
use T::core; //~ ERROR unresolved import `T::core`
22+
}

0 commit comments

Comments
 (0)