Reduce uses of hir_crate.

This commit is contained in:
Camille GILLOT
2025-06-18 15:14:48 +00:00
parent 75e7cf5f85
commit c6e77b3ba6
10 changed files with 27 additions and 34 deletions

View File

@@ -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();