Merge impl_wf_inference into coherence checking

This commit is contained in:
Michael Goulet 2023-10-24 16:51:26 +00:00
parent cee6db171d
commit a947654a96
5 changed files with 87 additions and 15 deletions

View file

@ -181,14 +181,11 @@ 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);
}