let body_exit;
// Find the tables for this body.
- let owner_hir_id = tcx.hir().body_owner(body.id());
- let owner_def_id = tcx.hir().local_def_id_from_hir_id(owner_hir_id);
+ let owner_def_id = tcx.hir().body_owner_def_id(body.id());
let tables = tcx.typeck_tables_of(owner_def_id);
let mut cfg_builder = CFGBuilder {
}
}
- /// Returns the `NodeId` that corresponds to the definition of
+ /// Returns the `HirId` that corresponds to the definition of
/// which this is the body of, i.e., a `fn`, `const` or `static`
/// item (possibly associated), a closure, or a `hir::AnonConst`.
pub fn body_owner(&self, BodyId { hir_id }: BodyId) -> HirId {