Simplify BodyId hashing.
This commit is contained in:
@@ -12,7 +12,6 @@ use rustc_span::def_id::DefPathHash;
|
||||
pub trait HashStableContext:
|
||||
rustc_ast::HashStableContext + rustc_target::HashStableContext
|
||||
{
|
||||
fn hash_body_id(&mut self, _: BodyId, hasher: &mut StableHasher);
|
||||
}
|
||||
|
||||
impl<HirCtx: crate::HashStableContext> ToStableHashKey<HirCtx> for HirId {
|
||||
@@ -80,12 +79,6 @@ impl<HirCtx: crate::HashStableContext> ToStableHashKey<HirCtx> for ForeignItemId
|
||||
}
|
||||
}
|
||||
|
||||
impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for BodyId {
|
||||
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
|
||||
hcx.hash_body_id(*self, hasher)
|
||||
}
|
||||
}
|
||||
|
||||
// The following implementations of HashStable for `ItemId`, `TraitItemId`, and
|
||||
// `ImplItemId` deserve special attention. Normally we do not hash `NodeId`s within
|
||||
// the HIR, since they just signify a HIR nodes own path. But `ItemId` et al
|
||||
|
||||
Reference in New Issue
Block a user