refactor rustc-hash integration

This commit is contained in:
Andre Bogus 2025-12-24 17:37:16 +01:00
parent 5944b12bd4
commit 8c697128eb
No known key found for this signature in database
GPG key ID: 06510AD4B2137CBF
3 changed files with 6 additions and 10 deletions

View file

@ -1,11 +1,9 @@
use std::hash::BuildHasherDefault;
pub use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet, FxHasher};
pub type StdEntry<'a, K, V> = std::collections::hash_map::Entry<'a, K, V>;
pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, FxBuildHasher>;
pub type FxIndexSet<V> = indexmap::IndexSet<V, FxBuildHasher>;
pub type IndexEntry<'a, K, V> = indexmap::map::Entry<'a, K, V>;
pub type IndexOccupiedEntry<'a, K, V> = indexmap::map::OccupiedEntry<'a, K, V>;

View file

@ -8,10 +8,10 @@ use std::hash::Hash;
use std::iter::{Product, Sum};
use std::ops::Index;
use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet};
use rustc_macros::{Decodable_NoContext, Encodable_NoContext};
use crate::fingerprint::Fingerprint;
use crate::fx::{FxBuildHasher, FxHashMap, FxHashSet};
use crate::stable_hasher::{HashStable, StableCompare, StableHasher, ToStableHashKey};
/// `UnordItems` is the order-less version of `Iterator`. It only contains methods

View file

@ -1,11 +1,9 @@
use std::hash::BuildHasherDefault;
pub use ena::unify::{NoError, UnifyKey, UnifyValue};
use rustc_hash::FxHasher;
use rustc_hash::FxBuildHasher;
pub use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};
pub type IndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
pub type IndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
pub type IndexMap<K, V> = indexmap::IndexMap<K, V, FxBuildHasher>;
pub type IndexSet<V> = indexmap::IndexSet<V, FxBuildHasher>;
mod delayed_map;