11use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher , ToStableHashKey } ;
22
33use crate :: hir:: {
4- AttributeMap , BodyId , Crate , Expr , ForeignItemId , ImplItemId , ItemId , OwnerNodes , TraitItemId ,
5- Ty ,
4+ AttributeMap , BodyId , Crate , ForeignItemId , ImplItemId , ItemId , OwnerNodes , TraitItemId ,
65} ;
76use crate :: hir_id:: { HirId , ItemLocalId } ;
87use rustc_span:: def_id:: DefPathHash ;
@@ -14,8 +13,6 @@ pub trait HashStableContext:
1413 rustc_ast:: HashStableContext + rustc_target:: HashStableContext
1514{
1615 fn hash_body_id ( & mut self , _: BodyId , hasher : & mut StableHasher ) ;
17- fn hash_hir_expr ( & mut self , _: & Expr < ' _ > , hasher : & mut StableHasher ) ;
18- fn hash_hir_ty ( & mut self , _: & Ty < ' _ > , hasher : & mut StableHasher ) ;
1916}
2017
2118impl < HirCtx : crate :: HashStableContext > ToStableHashKey < HirCtx > for HirId {
@@ -96,18 +93,6 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for BodyId {
9693// want to pick up on a reference changing its target, so we hash the NodeIds
9794// in "DefPath Mode".
9895
99- impl < HirCtx : crate :: HashStableContext > HashStable < HirCtx > for Expr < ' _ > {
100- fn hash_stable ( & self , hcx : & mut HirCtx , hasher : & mut StableHasher ) {
101- hcx. hash_hir_expr ( self , hasher)
102- }
103- }
104-
105- impl < HirCtx : crate :: HashStableContext > HashStable < HirCtx > for Ty < ' _ > {
106- fn hash_stable ( & self , hcx : & mut HirCtx , hasher : & mut StableHasher ) {
107- hcx. hash_hir_ty ( self , hasher)
108- }
109- }
110-
11196impl < ' tcx , HirCtx : crate :: HashStableContext > HashStable < HirCtx > for OwnerNodes < ' tcx > {
11297 fn hash_stable ( & self , hcx : & mut HirCtx , hasher : & mut StableHasher ) {
11398 // We ignore the `nodes` and `bodies` fields since these refer to information included in
0 commit comments