]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #90995 - the8472:hash-portability, r=dtolnay
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 27 Nov 2021 10:46:42 +0000 (11:46 +0100)
committerGitHub <noreply@github.com>
Sat, 27 Nov 2021 10:46:42 +0000 (11:46 +0100)
commit43279b27498c05cc11f08501ad6410397e9e4837
tree0c2b9a8a2b5bb95d856c8448731d06733e535ca5
parent14ef447d1237a2534f3acc19a2f986b217ef274d
parent53fc69f87c623cf3085127530b3f6a810bfd5a4a
Rollup merge of #90995 - the8472:hash-portability, r=dtolnay

Document non-guarantees for Hash

Dependence on endianness and type sizes was reported for enum discriminants in #74215 but it is a more general
issue since for example the default implementation of `Hasher::write_usize` uses native endianness.
Additionally the implementations of library types are occasionally changed as their internal fields
change or hashing gets optimized.

## Question

Should this go on the module level documentation instead since it also concerns `Hasher` to some extent and not just `Hash`?

resolves #74215