diff options
| author | bors <bors@rust-lang.org> | 2023-03-12 06:48:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-12 06:48:30 +0000 |
| commit | 150cb381471533050751111e5faf1d9f05c02f77 (patch) | |
| tree | 3180ee8fcea1444fdcfe2038f48bf3e06c661799 /compiler/rustc_mir_transform/src | |
| parent | 501ad021b9a4fb2cd6a39e0302d22f169f6166b0 (diff) | |
| parent | 9570023ce13d0b2fb3d5b79ce9db57e6d28c31d1 (diff) | |
| download | rust-150cb381471533050751111e5faf1d9f05c02f77.tar.gz rust-150cb381471533050751111e5faf1d9f05c02f77.zip | |
Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot
Avoid unnecessary hashing I noticed some stable hashing being done in a non-incremental build. It turns out that some of this is necessary to compute the crate hash, but some of it is not. Removing the unnecessary hashing is a perf win. r? `@cjgillot`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/mod.rs b/compiler/rustc_mir_transform/src/coverage/mod.rs index 9a617159813..5ecb2d6a631 100644 --- a/compiler/rustc_mir_transform/src/coverage/mod.rs +++ b/compiler/rustc_mir_transform/src/coverage/mod.rs @@ -577,5 +577,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().hash_including_bodies.to_smaller_hash() + tcx.hir_owner_nodes(owner).unwrap().opt_hash_including_bodies.unwrap().to_smaller_hash() } |
