Change maybe_body_owned_by to take local def id

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
Miguel Guarniz 2022-07-15 23:13:04 -04:00
parent 3924dac7bb
commit 25bdc8965e
19 changed files with 50 additions and 47 deletions

View file

@ -328,7 +328,7 @@ impl<'tcx> pprust_hir::PpAnn for TypedAnnotation<'tcx> {
let typeck_results = self.maybe_typeck_results.get().or_else(|| {
self.tcx
.hir()
.maybe_body_owned_by(self.tcx.hir().local_def_id_to_hir_id(expr.hir_id.owner))
.maybe_body_owned_by(self.tcx.hir().local_def_id(expr.hir_id))
.map(|body_id| self.tcx.typeck_body(body_id))
});