about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-10-24 16:51:26 +0000
committerMichael Goulet <michael@errs.io>2023-10-24 17:01:25 +0000
commita947654a96651e3acc911fe202907b283cd2ed5b (patch)
tree3775c594a3627a9baf214c7d5954a05ababd9dd5 /compiler
parentcee6db171d03c22f1cbf98a72dffde858a49fbd8 (diff)
downloadrust-a947654a96651e3acc911fe202907b283cd2ed5b.tar.gz
rust-a947654a96651e3acc911fe202907b283cd2ed5b.zip
Merge impl_wf_inference into coherence checking
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_hir_analysis/src/lib.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs
index 0622aa2ee80..f27ce7fa0e0 100644
--- a/compiler/rustc_hir_analysis/src/lib.rs
+++ b/compiler/rustc_hir_analysis/src/lib.rs
@@ -182,13 +182,10 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
     }
 
     tcx.sess.track_errors(|| {
-        tcx.sess.time("impl_wf_inference", || {
-            tcx.hir().for_each_module(|module| tcx.ensure().check_mod_impl_wf(module))
-        });
-    })?;
-
-    tcx.sess.track_errors(|| {
         tcx.sess.time("coherence_checking", || {
+            // Check impls constrain their parameters
+            tcx.hir().for_each_module(|module| tcx.ensure().check_mod_impl_wf(module));
+
             for &trait_def_id in tcx.all_local_trait_impls(()).keys() {
                 tcx.ensure().coherent_trait(trait_def_id);
             }