diff --git a/src/lib.rs b/src/lib.rs index 92a0ba2ce2..b220872dd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -310,12 +310,13 @@ pub type FastHashSet = rustc_hash::FxHashSet; pub type FastIndexSet = indexmap::IndexSet>; +/// Insertion-order-preserving hash map (`IndexMap`), but with the same +/// hasher as `FastHashMap` (faster but not resilient to DoS attacks). +pub type FastIndexMap = + indexmap::IndexMap>; + /// Map of expressions that have associated variable names -pub(crate) type NamedExpressions = indexmap::IndexMap< - Handle, - String, - std::hash::BuildHasherDefault, ->; +pub(crate) type NamedExpressions = FastIndexMap, String>; /// Early fragment tests. ///