-impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for VisibilityKind<'_> {
- fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
- hcx.hash_hir_visibility_kind(self, hasher)
- }
-}
-
-impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for TraitItem<'_> {
- fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
- let TraitItem { def_id: _, ident, ref generics, ref kind, span } = *self;
-
- hcx.hash_hir_item_like(|hcx| {
- ident.name.hash_stable(hcx, hasher);
- generics.hash_stable(hcx, hasher);
- kind.hash_stable(hcx, hasher);
- span.hash_stable(hcx, hasher);
- });
- }
-}
-
-impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ImplItem<'_> {
- fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
- let ImplItem { def_id: _, ident, ref vis, ref generics, ref kind, span } = *self;
-
- hcx.hash_hir_item_like(|hcx| {
- ident.name.hash_stable(hcx, hasher);
- vis.hash_stable(hcx, hasher);
- generics.hash_stable(hcx, hasher);
- kind.hash_stable(hcx, hasher);
- span.hash_stable(hcx, hasher);
- });
- }
-}
-
-impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ForeignItem<'_> {
- fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
- let ForeignItem { def_id: _, ident, ref kind, span, ref vis } = *self;
-
- hcx.hash_hir_item_like(|hcx| {
- ident.name.hash_stable(hcx, hasher);
- kind.hash_stable(hcx, hasher);
- span.hash_stable(hcx, hasher);
- vis.hash_stable(hcx, hasher);
- });
- }
-}
-
-impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for Item<'_> {
- fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
- let Item { ident, def_id: _, ref kind, ref vis, span } = *self;
-
- hcx.hash_hir_item_like(|hcx| {
- ident.name.hash_stable(hcx, hasher);
- kind.hash_stable(hcx, hasher);
- vis.hash_stable(hcx, hasher);
- span.hash_stable(hcx, hasher);
- });
- }
-}
-