X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_data_structures%2Ffx.rs;h=bbeb193dba32b4c8970d8bc18160d4d2dd5563c7;hb=d493dccef7ae1d2ca739fe828bf9556b44dc460a;hp=cf73fe8cf85ceeac553ff1db97a0b43fb2f3077a;hpb=d132f544f9d74e3cc047ef211e57eae60b78e5c5;p=rust.git diff --git a/src/librustc_data_structures/fx.rs b/src/librustc_data_structures/fx.rs index cf73fe8cf85..bbeb193dba3 100644 --- a/src/librustc_data_structures/fx.rs +++ b/src/librustc_data_structures/fx.rs @@ -1,6 +1,14 @@ use std::hash::BuildHasherDefault; -pub use rustc_hash::{FxHasher, FxHashMap, FxHashSet}; +pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher}; pub type FxIndexMap = indexmap::IndexMap>; pub type FxIndexSet = indexmap::IndexSet>; + +#[macro_export] +macro_rules! define_id_collections { + ($map_name:ident, $set_name:ident, $key:ty) => { + pub type $map_name = $crate::fx::FxHashMap<$key, T>; + pub type $set_name = $crate::fx::FxHashSet<$key>; + }; +}