]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #64824 - Mark-Simulacrum:no-stable-hasher-result-everywhere, r=michae...
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 29 Sep 2019 02:36:02 +0000 (04:36 +0200)
committerGitHub <noreply@github.com>
Sun, 29 Sep 2019 02:36:02 +0000 (04:36 +0200)
No StableHasherResult everywhere

This removes the generic parameter on `StableHasher`, instead moving it to the call to `finish`. This has the side-effect of making all `HashStable` impls nicer, since we no longer need the verbose `<W: StableHasherResult>` that previously existed -- often forcing line wrapping.

This is done for two reasons:
 * we should avoid false "generic" dependency on the result of StableHasher
     * we don't need to codegen two/three copies of all the HashStable impls when they're transitively used to produce a fingerprint, u64, or u128. I haven't measured, but this might actually make our artifacts somewhat smaller too.
 * Easier to understand/read/write code -- the result of the stable hasher is irrelevant when writing a hash impl.

1  2 
src/librustc/ty/layout.rs
src/librustc/ty/query/plumbing.rs

Simple merge
Simple merge