about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir_analysis/src/lib.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/lib.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs
index 0a3a71ba1a2..ad5b6664677 100644
--- a/compiler/rustc_hir_analysis/src/lib.rs
+++ b/compiler/rustc_hir_analysis/src/lib.rs
@@ -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 {