Add proper cfgs for struct HirIdValidator used only with debug assertions
This commit is contained in:
parent
2064c19886
commit
f41537981b
3 changed files with 18 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue