Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2943,6 +2943,7 @@ impl<'a> Resolver<'a> {

let mut lookup_results = Vec::new();
let mut worklist = Vec::new();
let mut seen_modules = FxHashSet();
worklist.push((self.graph_root, Vec::new(), false));

while let Some((in_module,
Expand Down Expand Up @@ -2989,7 +2990,7 @@ impl<'a> Resolver<'a> {
if !in_module_is_extern || name_binding.vis == ty::Visibility::Public {
// add the module to the lookup
let is_extern = in_module_is_extern || name_binding.is_extern_crate();
if !worklist.iter().any(|&(m, ..)| m.def() == module.def()) {
if seen_modules.insert(module.def_id().unwrap()) {
worklist.push((module, path_segments, is_extern));
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/recursive-reexports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

// aux-build:recursive_reexports.rs

fn f() -> recursive_reexports::S {} //~ ERROR undeclared
extern crate recursive_reexports;

fn f() -> recursive_reexports::S {} //~ ERROR type name `recursive_reexports::S` is undefined

fn main() {}