about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src/pretty.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-17 14:17:57 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-18 10:17:44 +1100
commitfd7b4bf4e19b19ebf9b536790ec1668a3e50fe6f (patch)
tree69d9f8931a08d79021a12cc89c655fa61bae744f /compiler/rustc_driver_impl/src/pretty.rs
parentce36a966c79e109dabeef7a47fe68e5294c6d71e (diff)
downloadrust-fd7b4bf4e19b19ebf9b536790ec1668a3e50fe6f.tar.gz
rust-fd7b4bf4e19b19ebf9b536790ec1668a3e50fe6f.zip
Move methods from `Map` to `TyCtxt`, part 2.
Continuing the work started in #136466.

Every method gains a `hir_` prefix, though for the ones that already
have a `par_` or `try_par_` prefix I added the `hir_` after that.
Diffstat (limited to 'compiler/rustc_driver_impl/src/pretty.rs')
-rw-r--r--compiler/rustc_driver_impl/src/pretty.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs
index 093ee659bb4..828a14e707c 100644
--- a/compiler/rustc_driver_impl/src/pretty.rs
+++ b/compiler/rustc_driver_impl/src/pretty.rs
@@ -164,8 +164,7 @@ impl<'tcx> pprust_hir::PpAnn for HirTypedAnn<'tcx> {
         if let pprust_hir::AnnNode::Expr(expr) = node {
             let typeck_results = self.maybe_typeck_results.get().or_else(|| {
                 self.tcx
-                    .hir()
-                    .maybe_body_owned_by(expr.hir_id.owner.def_id)
+                    .hir_maybe_body_owned_by(expr.hir_id.owner.def_id)
                     .map(|body_id| self.tcx.typeck_body(body_id.id()))
             });
 
@@ -317,7 +316,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
             rustc_hir_analysis::check_crate(tcx);
             tcx.dcx().abort_if_errors();
             debug!("pretty printing THIR tree");
-            for did in tcx.hir().body_owners() {
+            for did in tcx.hir_body_owners() {
                 let _ = writeln!(out, "{:?}:\n{}\n", did, thir_tree(tcx, did));
             }
             out
@@ -328,7 +327,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
             rustc_hir_analysis::check_crate(tcx);
             tcx.dcx().abort_if_errors();
             debug!("pretty printing THIR flat");
-            for did in tcx.hir().body_owners() {
+            for did in tcx.hir_body_owners() {
                 let _ = writeln!(out, "{:?}:\n{}\n", did, thir_flat(tcx, did));
             }
             out