1
Fork 0

Avoid rehashing Fingerprint as a map key

This introduces a no-op `Unhasher` for map keys that are already hash-
like, for example `Fingerprint` and its wrapper `DefPathHash`. For these
we can directly produce the `u64` hash for maps. The first use of this
is `def_path_hash_to_def_id: Option<UnhashMap<DefPathHash, DefId>>`.
This commit is contained in:
Josh Stone 2020-09-01 18:27:02 -07:00
parent 130359cb05
commit 469ca379d6
4 changed files with 62 additions and 3 deletions

View file

@ -103,6 +103,7 @@ pub use atomic_ref::AtomicRef;
pub mod frozen;
pub mod tagged_ptr;
pub mod temp_dir;
pub mod unhash;
pub struct OnDrop<F: Fn()>(pub F);