-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stable hashing: Remove unused field and add documentation. #60915
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
/// That second condition is usually not required for hash functions | ||
/// (e.g. `Hash`). In practice this means that `hash_stable` must feed any | ||
/// information into the hasher that a `PartialEq` comparision takes into | ||
/// account. See #49300 for an example where violating this invariant has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// account. See #49300 for an example where violating this invariant has | |
/// account. See [#49300](https://github.com/rust-lang/rust/issues/49300) for an example where violating this invariant has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Other than the link for the sake of https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/stable_hasher/trait.HashStable.html, r=me |
f2453c2
to
a79c06a
Compare
I updated the link. |
📌 Commit a79c06a has been approved by |
…=estebank stable hashing: Remove unused field and add documentation. This PR removes the `bytes_hashed` field from `StableHasher` which in the past has been used for collecting some statistics but has gone unused for quite a while (months at least) now. The PR also tries to document some requirements for `HashStable` implementations that haven't been written down explicitly anywhere.
Rollup of 11 pull requests Successful merges: - #60383 (Fix position source code files toggle) - #60453 (Fall back to `/dev/urandom` on `EPERM` for `getrandom`) - #60487 (Fix search sidebar width when no crate select is present) - #60511 (Fix intra-doc link resolution failure on re-exporting libstd) - #60823 (Fix incremental compilation of cdylib emitting spurious unused_attributes lint) - #60915 (stable hashing: Remove unused field and add documentation.) - #60942 (Misc changes to rustc_metadata) - #60952 (Document BinaryHeap time complexity) - #60959 (rustc: Improve type size assertions) - #60972 (remove confusing remarks about mixed volatile and non-volatile accesses) - #60983 (Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #60986) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR removes the
bytes_hashed
field fromStableHasher
which in the past has been used for collecting some statistics but has gone unused for quite a while (months at least) now.The PR also tries to document some requirements for
HashStable
implementations that haven't been written down explicitly anywhere.