From c5cfcdc4ac0880b171dc0004c660e3a6fd315ee0 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 10 Oct 2023 10:53:12 +1100 Subject: Remove unnecessary call to `call_with_pp_support_hir`. The callback is trivial and no pp support is actually needed. This makes the `HirTree` case more like the `AstTree` case above. --- compiler/rustc_driver_impl/src/pretty.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_driver_impl/src') diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs index 5d49c78dea4..bae0d3dd6a6 100644 --- a/compiler/rustc_driver_impl/src/pretty.rs +++ b/compiler/rustc_driver_impl/src/pretty.rs @@ -441,10 +441,8 @@ pub fn print_after_hir_lowering<'tcx>(tcx: TyCtxt<'tcx>, ppm: PpMode) { }), HirTree => { - call_with_pp_support_hir(&PpHirMode::Normal, tcx, move |_annotation, hir_map| { - debug!("pretty printing HIR tree"); - format!("{:#?}", hir_map.krate()) - }) + debug!("pretty printing HIR tree"); + format!("{:#?}", tcx.hir().krate()) } _ => unreachable!(), -- cgit 1.4.1-3-g733a5