22//! types in no particular order.
33
44use crate :: ich:: { NodeIdHashingMode , StableHashingContext } ;
5- use rustc_attr as attr;
65use rustc_data_structures:: fingerprint:: Fingerprint ;
76use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher , ToStableHashKey } ;
87use rustc_hir as hir;
@@ -114,15 +113,6 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
114113 }
115114}
116115
117- impl < ' a > ToStableHashKey < StableHashingContext < ' a > > for hir:: ItemLocalId {
118- type KeyType = hir:: ItemLocalId ;
119-
120- #[ inline]
121- fn to_stable_hash_key ( & self , _: & StableHashingContext < ' a > ) -> hir:: ItemLocalId {
122- * self
123- }
124- }
125-
126116impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Body < ' _ > {
127117 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
128118 let hir:: Body { params, value, generator_kind } = self ;
@@ -135,19 +125,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Body<'_> {
135125 }
136126}
137127
138- impl < ' a > ToStableHashKey < StableHashingContext < ' a > > for hir:: BodyId {
139- type KeyType = ( DefPathHash , hir:: ItemLocalId ) ;
140-
141- #[ inline]
142- fn to_stable_hash_key (
143- & self ,
144- hcx : & StableHashingContext < ' a > ,
145- ) -> ( DefPathHash , hir:: ItemLocalId ) {
146- let hir:: BodyId { hir_id } = * self ;
147- hir_id. to_stable_hash_key ( hcx)
148- }
149- }
150-
151128impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: TraitCandidate {
152129 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
153130 hcx. with_node_id_hashing_mode ( NodeIdHashingMode :: HashDefPath , |hcx| {
@@ -171,21 +148,3 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::TraitCandidate {
171148 )
172149 }
173150}
174-
175- impl < ' hir > HashStable < StableHashingContext < ' hir > > for attr:: InlineAttr {
176- fn hash_stable ( & self , hcx : & mut StableHashingContext < ' hir > , hasher : & mut StableHasher ) {
177- mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
178- }
179- }
180-
181- impl < ' hir > HashStable < StableHashingContext < ' hir > > for attr:: InstructionSetAttr {
182- fn hash_stable ( & self , hcx : & mut StableHashingContext < ' hir > , hasher : & mut StableHasher ) {
183- mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
184- }
185- }
186-
187- impl < ' hir > HashStable < StableHashingContext < ' hir > > for attr:: OptimizeAttr {
188- fn hash_stable ( & self , hcx : & mut StableHashingContext < ' hir > , hasher : & mut StableHasher ) {
189- mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
190- }
191- }
0 commit comments