diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-18 15:14:48 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-18 15:46:19 +0000 |
| commit | c6e77b3ba63cc9f824f99b7d356055e22bcf2ae2 (patch) | |
| tree | 4796b2cbbf0c77660c379250af8c0df82990d476 /compiler/rustc_driver_impl/src | |
| parent | 75e7cf5f85aad82331a38deff24845b63eaf30f3 (diff) | |
| download | rust-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.rs | 6 |
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(); |
