提交 232783c9 编写于 作者: J Jeffrey Seyfried

Fix infinite loop on recursive module exports in an extern crate

上级 ea0dc929
......@@ -3194,7 +3194,9 @@ fn lookup_candidates<FilterFn>(&mut self,
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();
worklist.push((module, path_segments, is_extern));
if !worklist.iter().any(|&(m, _, _)| m.def == module.def) {
worklist.push((module, path_segments, is_extern));
}
}
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册