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:
parent
130359cb05
commit
469ca379d6
4 changed files with 62 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue