]> git.lizzy.rs Git - rust.git/blob - src/librustc_data_structures/fx.rs
Auto merge of #67760 - Mark-Simulacrum:rustc-dirty, r=alexcrichton
[rust.git] / src / librustc_data_structures / 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 }