Avoid a track_errors by bubbling up most errors from check_well_formed

This commit is contained in:
Oli Scherer 2023-10-18 08:47:17 +00:00
parent 7849162ace
commit fd9ef69adf
33 changed files with 337 additions and 305 deletions

View file

@ -205,10 +205,8 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
})?;
}
tcx.sess.track_errors(|| {
tcx.sess.time("wf_checking", || {
tcx.hir().par_for_each_module(|module| tcx.ensure().check_mod_type_wf(module))
});
tcx.sess.time("wf_checking", || {
tcx.hir().try_par_for_each_module(|module| tcx.check_mod_type_wf(module))
})?;
// NOTE: This is copy/pasted in librustdoc/core.rs and should be kept in sync.