Remove Clone impl for StableHashingContext.#154744
Remove Clone impl for StableHashingContext.#154744nnethercote wants to merge 1 commit intorust-lang:mainfrom
Clone impl for StableHashingContext.#154744Conversation
`HashStable::hash_stable` takes a `&mut Hcx`. In contrast, `ToStableHashKey::to_stable_hash_key` takes a `&Hcx`. But there are some places where the latter calls the former, and due to the mismatch a `clone` call is required to get a mutable `StableHashingContext`. This commit changes `to_stable_hash_key` to instead take a `&mut Hcx`. This eliminates the mismatch, the need for the clones, and the need for the `Clone` impls.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…, r=<try> Remove `Clone` impl for `StableHashingContext`.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (b67d172): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 486.952s -> 486.532s (-0.09%) |
|
|
|
The Miri subtree was changed cc @rust-lang/miri |
|
This PR makes |
HashStable::hash_stabletakes a&mut Hcx. In contrast,ToStableHashKey::to_stable_hash_keytakes a&Hcx. But there are some places where the latter calls the former, and due to the mismatch aclonecall is required to get a mutableStableHashingContext.This commit changes
to_stable_hash_keyto instead take a&mut Hcx. This eliminates the mismatch, the need for the clones, and the need for theCloneimpls.r? @fee1-dead