mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 19:47:38 +00:00
Fix infinite loop on recursive module exports in an extern crate
This commit is contained in:
parent
ea0dc92972
commit
232783c914
@ -3194,7 +3194,9 @@ impl<'a> Resolver<'a> {
|
|||||||
if !in_module_is_extern || name_binding.vis == ty::Visibility::Public {
|
if !in_module_is_extern || name_binding.vis == ty::Visibility::Public {
|
||||||
// add the module to the lookup
|
// add the module to the lookup
|
||||||
let is_extern = in_module_is_extern || name_binding.is_extern_crate();
|
let is_extern = in_module_is_extern || name_binding.is_extern_crate();
|
||||||
worklist.push((module, path_segments, is_extern));
|
if !worklist.iter().any(|&(m, _, _)| m.def == module.def) {
|
||||||
|
worklist.push((module, path_segments, is_extern));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user