Don't add exposed modules to imported_modules

This commit is contained in:
Richard Feldman 2022-12-26 04:35:23 -05:00
parent a663634e30
commit 8c40d72a1f
No known key found for this signature in database
GPG Key ID: F1F21AA5B1D9E43B

View File

@ -4573,18 +4573,6 @@ fn build_header<'a>(
module_id,
);
deps_by_name.insert(pq_module_name, module_id);
// We should never change an entry here. Either we should have no entry,
// or if we do have one, it should be unchanged by this insertion.
debug_assert_eq!(
&loc_module_name.region,
imported_modules.get(&module_id).unwrap_or(&loc_module_name.region),
"Already had an imported_modules entry for {:?}, but it was {:?} rather than the expected {:?}",
module_id,
imported_modules.get(&module_id).unwrap(),
loc_module_name.region,
);
imported_modules.insert(module_id, loc_module_name.region);
}
}
}