]> git.lizzy.rs Git - rust.git/commit
Use StableHasher everywhere
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 13 Dec 2016 23:45:03 +0000 (01:45 +0200)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Thu, 15 Dec 2016 18:48:59 +0000 (20:48 +0200)
commite1d4b8fc8c3e991627715916f7285611ec49424e
tree441848cd994f7c799329d2bf8ca370e4edf3f4a0
parent01d53df82ef12625f947f5c0a6004e1aea2f9782
Use StableHasher everywhere

The standard implementations of Hasher have architecture-dependent
results when hashing integers. This causes problems when the hashes are
stored within metadata - metadata written by one host architecture can't
be read by another.

To fix that, implement an architecture-independent StableHasher and use
it in all places an architecture-independent hasher is needed.

Fixes #38177.
14 files changed:
src/librustc/hir/map/definitions.rs
src/librustc/ty/util.rs
src/librustc_data_structures/lib.rs
src/librustc_data_structures/stable_hasher.rs [new file with mode: 0644]
src/librustc_driver/driver.rs
src/librustc_incremental/calculate_svh/hasher.rs [deleted file]
src/librustc_incremental/calculate_svh/mod.rs
src/librustc_incremental/calculate_svh/svh_visitor.rs
src/librustc_incremental/ich/fingerprint.rs
src/librustc_incremental/lib.rs
src/librustc_incremental/persist/save.rs
src/librustc_trans/back/symbol_names.rs
src/librustc_trans/debuginfo/metadata.rs
src/libserialize/leb128.rs