about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-05-29 10:03:40 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-05-29 10:04:08 +0000
commita34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5 (patch)
treeed274505213e5fb6ed3320bd9a5213dd9fca4616 /compiler/rustc_driver_impl
parentceb45d55190eb00d30b8762bc4c34cf71c53b637 (diff)
downloadrust-a34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5.tar.gz
rust-a34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5.zip
Make `body_owned_by` return the body directly.
Almost all callers want this anyway, and now we can use it to also return fed bodies
Diffstat (limited to 'compiler/rustc_driver_impl')
-rw-r--r--compiler/rustc_driver_impl/src/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs
index fe426b8111c..8acba57b7a6 100644
--- a/compiler/rustc_driver_impl/src/pretty.rs
+++ b/compiler/rustc_driver_impl/src/pretty.rs
@@ -169,7 +169,7 @@ impl<'tcx> pprust_hir::PpAnn for HirTypedAnn<'tcx> {
                 self.tcx
                     .hir()
                     .maybe_body_owned_by(expr.hir_id.owner.def_id)
-                    .map(|body_id| self.tcx.typeck_body(body_id))
+                    .map(|body_id| self.tcx.typeck_body(body_id.id()))
             });
 
             if let Some(typeck_results) = typeck_results {