1
Fork 0

Rollup merge of #122066 - mu001999:clean, r=oli-obk

Add proper cfgs for struct HirIdValidator used only with debug-assert

See https://github.com/rust-lang/rust/pull/122065#issuecomment-1980118572.
I think it's due to #121752.
This commit is contained in:
Guillaume Gomez 2024-03-07 15:07:06 +01:00 committed by GitHub
commit f1fb720734
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 26 deletions

View file

@ -686,6 +686,11 @@ pub fn create_global_ctxt<'tcx>(
/// Runs the type-checking, region checking and other miscellaneous analysis
/// passes on the crate.
fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
if tcx.sess.opts.unstable_opts.hir_stats {
rustc_passes::hir_stats::print_hir_stats(tcx);
}
#[cfg(debug_assertions)]
rustc_passes::hir_id_validator::check_crate(tcx);
let sess = tcx.sess;