1
Fork 0

Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk

hir: Refactor getters for owner nodes
This commit is contained in:
bors 2024-01-31 05:37:49 +00:00
commit d53ddcd8bb
49 changed files with 918 additions and 925 deletions

View file

@ -452,10 +452,5 @@ fn get_body_span<'tcx>(
fn hash_mir_source<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &'tcx rustc_hir::Body<'tcx>) -> u64 {
// FIXME(cjgillot) Stop hashing HIR manually here.
let owner = hir_body.id().hir_id.owner;
tcx.hir_owner_nodes(owner)
.unwrap()
.opt_hash_including_bodies
.unwrap()
.to_smaller_hash()
.as_u64()
tcx.hir_owner_nodes(owner).opt_hash_including_bodies.unwrap().to_smaller_hash().as_u64()
}