]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_data_structures/src/fx.rs
Rollup merge of #94240 - compiler-errors:pathbuf-display, r=lcnr
[rust.git] / compiler / rustc_data_structures / src / fx.rs
1 use std::hash::BuildHasherDefault;
2
3 pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
4
5 pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
6 pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
7
8 #[macro_export]
9 macro_rules! define_id_collections {
10     ($map_name:ident, $set_name:ident, $key:ty) => {
11         pub type $map_name<T> = $crate::fx::FxHashMap<$key, T>;
12         pub type $set_name = $crate::fx::FxHashSet<$key>;
13     };
14 }