about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/stable_hasher/tests.rs
AgeCommit message (Collapse)AuthorLines
2025-01-11rename `BitSet` to `DenseBitSet`Rémy Rakic-3/+3
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
2024-07-11Use uplifted `rustc-stable-hash` crate in `rustc_data_structures`Urgau-65/+0
2023-04-18Store hashes in special types so they aren't accidentally encoded as numbersBen Kimock-1/+1
2023-04-05Fix a couple missed hash constantsThom Chiovoloni-3/+3
2023-03-03Match end user facing unmatched backticks in compiler/est31-1/+1
2022-02-03Fix `isize` optimization in `StableHasher` for big-endian architecturesJakub Beránek-0/+1
2022-01-30Compress amount of hashed bytes for `isize` values in StableHasherJakub Beránek-2/+22
2022-01-24Add test stable hash uniqueness of adjacent field valuesJakub Beránek-0/+42
2021-12-18Implement StableHash for BitSet and BitMatrix via HashTomasz Miąsko-0/+27
This fixes an issue where bit sets / bit matrices the same word content but a different domain size would receive the same hash.
2020-09-30Stable hashing: add comments and tests concerning platform-independenceTyson Nottingham-0/+73
SipHasher128 implements short_write in an endian-independent way, yet its write_xxx Hasher trait methods undo this endian-independence by byte swapping the integer inputs on big-endian hardware. StableHasher then adds endian-independence back by also byte-swapping on big-endian hardware prior to invoking SipHasher128. This double swap may have the appearance of being a no-op, but is in fact by design. In particular, we really do want SipHasher128 to be platform-dependent, in order to be consistent with the libstd SipHasher. Try to clarify this intent. Also, add and update a couple of unit tests.