pub trait ToStableHashKey<HCX> {
    type KeyType: Ord + Sized + HashStable<HCX>;

    fn to_stable_hash_key(&self, hcx: &HCX) -> Self::KeyType;
}
Expand description

Implement this for types that can be turned into stable keys like, for example, for DefId that can be converted to a DefPathHash. This is used for bringing maps into a predictable order before hashing them.

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Implementors§

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for HirId

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for ItemLocalId

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for BodyId

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for ItemId

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for TraitItemId

impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for ImplItemId

impl<HCX: HashStableContext> ToStableHashKey<HCX> for LintExpectationId

impl<HCX> ToStableHashKey<HCX> for LintId

impl<'a, 'tcx, T> ToStableHashKey<StableHashingContext<'a>> for &'tcx List<T>where
    T: HashStable<StableHashingContext<'a>>,

impl<CTX> ToStableHashKey<CTX> for Symbol