2
2
//! types in no particular order.
3
3
4
4
use crate :: ich:: { NodeIdHashingMode , StableHashingContext } ;
5
- use rustc_attr as attr;
6
5
use rustc_data_structures:: fingerprint:: Fingerprint ;
7
6
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher , ToStableHashKey } ;
8
7
use rustc_hir as hir;
@@ -114,15 +113,6 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
114
113
}
115
114
}
116
115
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
-
126
116
impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Body < ' _ > {
127
117
fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
128
118
let hir:: Body { params, value, generator_kind } = self ;
@@ -135,19 +125,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Body<'_> {
135
125
}
136
126
}
137
127
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
-
151
128
impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: TraitCandidate {
152
129
fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
153
130
hcx. with_node_id_hashing_mode ( NodeIdHashingMode :: HashDefPath , |hcx| {
@@ -171,21 +148,3 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::TraitCandidate {
171
148
)
172
149
}
173
150
}
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