about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-07 15:07:06 +0100
committerGitHub <noreply@github.com>2024-03-07 15:07:06 +0100
commitf1fb720734d55c8855a5bc00b9de556c170eaa76 (patch)
tree37bd17b79a34303acc990c1fec854ab2ce01bff6 /compiler/rustc_interface/src
parente52c5411bb14fce931f24c4eaa6bdfa9d0242fa6 (diff)
parent71d35d8d0c143eed482382b19d35103743c015ae (diff)
downloadrust-f1fb720734d55c8855a5bc00b9de556c170eaa76.tar.gz
rust-f1fb720734d55c8855a5bc00b9de556c170eaa76.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 085e9026051..61f0ab14e8c 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -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;