Remove track_errors entirely
This commit is contained in:
@@ -172,19 +172,15 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
|
||||
|
||||
tcx.sess.time("coherence_checking", || {
|
||||
// Check impls constrain their parameters
|
||||
let res =
|
||||
let mut res =
|
||||
tcx.hir().try_par_for_each_module(|module| tcx.ensure().check_mod_impl_wf(module));
|
||||
|
||||
// FIXME(matthewjasper) We shouldn't need to use `track_errors` anywhere in this function
|
||||
// or the compiler in general.
|
||||
res.and(tcx.sess.track_errors(|| {
|
||||
for &trait_def_id in tcx.all_local_trait_impls(()).keys() {
|
||||
tcx.ensure().coherent_trait(trait_def_id);
|
||||
}
|
||||
}))
|
||||
for &trait_def_id in tcx.all_local_trait_impls(()).keys() {
|
||||
res = res.and(tcx.ensure().coherent_trait(trait_def_id));
|
||||
}
|
||||
// these queries are executed for side-effects (error reporting):
|
||||
.and(tcx.ensure().crate_inherent_impls(()))
|
||||
.and(tcx.ensure().crate_inherent_impls_overlap_check(()))
|
||||
res.and(tcx.ensure().crate_inherent_impls(()))
|
||||
.and(tcx.ensure().crate_inherent_impls_overlap_check(()))
|
||||
})?;
|
||||
|
||||
if tcx.features().rustc_attrs {
|
||||
|
||||
Reference in New Issue
Block a user