1
Fork 0

resolve: Avoid comparing modules by optional def-id

It makes all block modules identical during comparison
This commit is contained in:
Vadim Petrochenkov 2021-09-26 19:29:53 +03:00
parent 5aa732a364
commit ded08e44c6
5 changed files with 19 additions and 15 deletions

View file

@ -220,8 +220,7 @@ impl<'a> Resolver<'a> {
}
crate fn build_reduced_graph_external(&mut self, module: Module<'a>) {
let def_id = module.def_id().expect("unpopulated module without a def-id");
for child in self.cstore().item_children_untracked(def_id, self.session) {
for child in self.cstore().item_children_untracked(module.def_id(), self.session) {
let parent_scope = ParentScope::module(module, self);
BuildReducedGraphVisitor { r: self, parent_scope }
.build_reduced_graph_for_external_crate_res(child);