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.
This commit is contained in:
parent
ce36a966c7
commit
fd7b4bf4e1
108 changed files with 314 additions and 346 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue