Skip to content

Commit

Permalink
Fix infinite loop on recursive module exports in an extern crate
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Jun 28, 2016
1 parent ea0dc92 commit 232783c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,9 @@ 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();
worklist.push((module, path_segments, is_extern));
if !worklist.iter().any(|&(m, _, _)| m.def == module.def) {
worklist.push((module, path_segments, is_extern));
}
}
}
})
Expand Down

0 comments on commit 232783c

Please sign in to comment.