about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2025-06-18 15:14:48 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2025-06-18 15:46:19 +0000
commitc6e77b3ba63cc9f824f99b7d356055e22bcf2ae2 (patch)
tree4796b2cbbf0c77660c379250af8c0df82990d476 /compiler/rustc_driver_impl/src
parent75e7cf5f85aad82331a38deff24845b63eaf30f3 (diff)
downloadrust-c6e77b3ba63cc9f824f99b7d356055e22bcf2ae2.tar.gz
rust-c6e77b3ba63cc9f824f99b7d356055e22bcf2ae2.zip
Reduce uses of `hir_crate`.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-rw-r--r--compiler/rustc_driver_impl/src/pretty.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs
index ec77043cd12..688307a941f 100644
--- a/compiler/rustc_driver_impl/src/pretty.rs
+++ b/compiler/rustc_driver_impl/src/pretty.rs
@@ -292,7 +292,11 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
         }
         HirTree => {
             debug!("pretty printing HIR tree");
-            format!("{:#?}", ex.tcx().hir_crate(()))
+            ex.tcx()
+                .hir_crate_items(())
+                .owners()
+                .map(|owner| format!("{:#?} => {:#?}\n", owner, ex.tcx().hir_owner_nodes(owner)))
+                .collect()
         }
         Mir => {
             let mut out = Vec::new();