Skip to main content

rustc_type_ir/data_structures/
mod.rs

1pub use ena::unify::{NoError, UnifyKey, UnifyValue};
2use rustc_hash::FxBuildHasher;
3pub use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};
4
5pub type IndexMap<K, V> = indexmap::IndexMap<K, V, FxBuildHasher>;
6pub type IndexSet<V> = indexmap::IndexSet<V, FxBuildHasher>;
7
8mod delayed_map;
9
10#[cfg(feature = "nightly")]
11mod impl_ {
12    pub use rustc_data_structures::sso::{SsoHashMap, SsoHashSet};
13    pub use rustc_data_structures::stack::ensure_sufficient_stack;
14}
15
16#[cfg(not(feature = "nightly"))]
17mod impl_ {
18    pub use std::collections::{HashMap as SsoHashMap, HashSet as SsoHashSet};
19
20    #[inline]
21    pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
22        f()
23    }
24}
25
26pub use delayed_map::{DelayedMap, DelayedSet};
27pub use impl_::*;