Merge various rustc_attr based tests

This commit is contained in:
Oli Scherer 2024-03-07 14:10:57 +00:00
parent 4279da583c
commit e2e751e76d
6 changed files with 136 additions and 142 deletions

View file

@ -160,6 +160,8 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
if tcx.features().rustc_attrs {
tcx.sess.time("outlives_testing", || outlives::test::test_inferred_outlives(tcx));
tcx.sess.time("variance_testing", || variance::test::test_variance(tcx));
collect::test_opaque_hidden_types(tcx);
}
tcx.sess.time("coherence_checking", || {
@ -175,14 +177,6 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
let _ = tcx.ensure().crate_inherent_impls_overlap_check(());
});
if tcx.features().rustc_attrs {
tcx.sess.time("variance_testing", || variance::test::test_variance(tcx));
}
if tcx.features().rustc_attrs {
collect::test_opaque_hidden_types(tcx);
}
// Make sure we evaluate all static and (non-associated) const items, even if unused.
// If any of these fail to evaluate, we do not want this crate to pass compilation.
tcx.hir().par_body_owners(|item_def_id| {