Store hashes in special types so they aren't accidentally encoded as numbers
This commit is contained in:
parent
de96f3d873
commit
0445fbdd83
38 changed files with 274 additions and 138 deletions
|
@ -577,5 +577,10 @@ 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()
|
||||
tcx.hir_owner_nodes(owner)
|
||||
.unwrap()
|
||||
.opt_hash_including_bodies
|
||||
.unwrap()
|
||||
.to_smaller_hash()
|
||||
.as_u64()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue