]> git.proxmox.com Git - rustc.git/blame - src/librustc_data_structures/fx.rs
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_data_structures / fx.rs
CommitLineData
dc9dc135
XL
1use std::hash::BuildHasherDefault;
2
dfeec247 3pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
dc9dc135
XL
4
5pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
6pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
dfeec247
XL
7
8#[macro_export]
9macro_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}