Run wfcheck in one big loop instead of per module

This commit is contained in:
Oli Scherer
2025-06-03 15:06:04 +00:00
parent b17dba4518
commit 82ed50c294
8 changed files with 63 additions and 68 deletions

View File

@@ -182,9 +182,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
// what we are intending to discard, to help future type-based refactoring.
type R = Result<(), ErrorGuaranteed>;
tcx.par_hir_for_each_module(|module| {
let _: R = tcx.ensure_ok().check_mod_type_wf(module);
});
let _: R = tcx.ensure_ok().check_type_wf(());
for &trait_def_id in tcx.all_local_trait_impls(()).keys() {
let _: R = tcx.ensure_ok().coherent_trait(trait_def_id);