]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_data_structures/fx.rs
Apply `resolve_vars_if_possible` to returned types for more accurate suggestions
[rust.git] / src / librustc_data_structures / fx.rs
index a9e8c2edbff9ee64ae79f5f3ff5b7004619f4ef4..bbeb193dba32b4c8970d8bc18160d4d2dd5563c7 100644 (file)
@@ -4,3 +4,11 @@
 
 pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
 pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
+
+#[macro_export]
+macro_rules! define_id_collections {
+    ($map_name:ident, $set_name:ident, $key:ty) => {
+        pub type $map_name<T> = $crate::fx::FxHashMap<$key, T>;
+        pub type $set_name = $crate::fx::FxHashSet<$key>;
+    };
+}