diff --git a/Cargo.toml b/Cargo.toml index 7e73d021c3..44a7eaf7a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ all-features = true bitflags = "1" bit-set = "0.5" codespan-reporting = { version = "0.11.0", optional = true } -fxhash = "0.2" +rustc-hash = "1.1.0" indexmap = "1.6" # 1.7 has MSRV 1.49 log = "0.4" num-traits = "0.2" diff --git a/src/front/spv/mod.rs b/src/front/spv/mod.rs index fc5d2096b7..55a5691dee 100644 --- a/src/front/spv/mod.rs +++ b/src/front/spv/mod.rs @@ -547,7 +547,7 @@ pub struct Parser { switch_cases: indexmap::IndexMap< spirv::Word, (BodyIndex, Vec), - std::hash::BuildHasherDefault, + std::hash::BuildHasherDefault, >, /// Tracks usage of builtins, used to cull unused builtins since they can diff --git a/src/lib.rs b/src/lib.rs index 6cda40f214..05506190e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -215,11 +215,6 @@ pub mod valid; pub use crate::arena::{Arena, Handle, Range, UniqueArena}; -use std::{ - collections::{HashMap, HashSet}, - hash::BuildHasherDefault, -}; - pub use crate::span::{Span, SpanContext, WithSpan}; #[cfg(feature = "deserialize")] use serde::Deserialize; @@ -230,9 +225,9 @@ use serde::Serialize; pub const BOOL_WIDTH: Bytes = 1; /// Hash map that is faster but not resilient to DoS attacks. -pub type FastHashMap = HashMap>; +pub type FastHashMap = rustc_hash::FxHashMap; /// Hash set that is faster but not resilient to DoS attacks. -pub type FastHashSet = HashSet>; +pub type FastHashSet = rustc_hash::FxHashSet; /// Map of expressions that have associated variable names pub(crate) type NamedExpressions = FastHashMap, String>;