@@ -6,19 +6,15 @@ use crate::hir::map::DefPathHash;
66use crate :: hir:: def_id:: { DefId , LocalDefId , CrateNum , CRATE_DEF_INDEX } ;
77use crate :: ich:: { StableHashingContext , NodeIdHashingMode , Fingerprint } ;
88
9- use rustc_data_structures:: stable_hasher:: {
10- HashStable , ToStableHashKey , StableHasher , StableHasherResult ,
11- } ;
9+ use rustc_data_structures:: stable_hasher:: { HashStable , ToStableHashKey , StableHasher } ;
1210use smallvec:: SmallVec ;
1311use std:: mem;
1412use syntax:: ast;
1513use syntax:: attr;
1614
1715impl < ' a > HashStable < StableHashingContext < ' a > > for DefId {
1816 #[ inline]
19- fn hash_stable < W : StableHasherResult > ( & self ,
20- hcx : & mut StableHashingContext < ' a > ,
21- hasher : & mut StableHasher < W > ) {
17+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
2218 hcx. def_path_hash ( * self ) . hash_stable ( hcx, hasher) ;
2319 }
2420}
@@ -34,9 +30,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for DefId {
3430
3531impl < ' a > HashStable < StableHashingContext < ' a > > for LocalDefId {
3632 #[ inline]
37- fn hash_stable < W : StableHasherResult > ( & self ,
38- hcx : & mut StableHashingContext < ' a > ,
39- hasher : & mut StableHasher < W > ) {
33+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
4034 hcx. def_path_hash ( self . to_def_id ( ) ) . hash_stable ( hcx, hasher) ;
4135 }
4236}
@@ -52,9 +46,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for LocalDefId {
5246
5347impl < ' a > HashStable < StableHashingContext < ' a > > for CrateNum {
5448 #[ inline]
55- fn hash_stable < W : StableHasherResult > ( & self ,
56- hcx : & mut StableHashingContext < ' a > ,
57- hasher : & mut StableHasher < W > ) {
49+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
5850 hcx. def_path_hash ( DefId {
5951 krate : * self ,
6052 index : CRATE_DEF_INDEX
@@ -92,9 +84,7 @@ for hir::ItemLocalId {
9284// in "DefPath Mode".
9385
9486impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: ItemId {
95- fn hash_stable < W : StableHasherResult > ( & self ,
96- hcx : & mut StableHashingContext < ' a > ,
97- hasher : & mut StableHasher < W > ) {
87+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
9888 let hir:: ItemId {
9989 id
10090 } = * self ;
@@ -106,9 +96,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::ItemId {
10696}
10797
10898impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: TraitItemId {
109- fn hash_stable < W : StableHasherResult > ( & self ,
110- hcx : & mut StableHashingContext < ' a > ,
111- hasher : & mut StableHasher < W > ) {
99+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
112100 let hir:: TraitItemId {
113101 hir_id
114102 } = * self ;
@@ -120,9 +108,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::TraitItemId {
120108}
121109
122110impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: ImplItemId {
123- fn hash_stable < W : StableHasherResult > ( & self ,
124- hcx : & mut StableHashingContext < ' a > ,
125- hasher : & mut StableHasher < W > ) {
111+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
126112 let hir:: ImplItemId {
127113 hir_id
128114 } = * self ;
@@ -138,9 +124,7 @@ impl_stable_hash_for!(struct ast::Label {
138124} ) ;
139125
140126impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Ty {
141- fn hash_stable < W : StableHasherResult > ( & self ,
142- hcx : & mut StableHashingContext < ' a > ,
143- hasher : & mut StableHasher < W > ) {
127+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
144128 hcx. while_hashing_hir_bodies ( true , |hcx| {
145129 let hir:: Ty {
146130 hir_id : _,
@@ -166,9 +150,7 @@ impl_stable_hash_for!(struct hir::Stmt {
166150impl_stable_hash_for_spanned ! ( ast:: Name ) ;
167151
168152impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Expr {
169- fn hash_stable < W : StableHasherResult > ( & self ,
170- hcx : & mut StableHashingContext < ' a > ,
171- hasher : & mut StableHasher < W > ) {
153+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
172154 hcx. while_hashing_hir_bodies ( true , |hcx| {
173155 let hir:: Expr {
174156 hir_id : _,
@@ -192,9 +174,7 @@ impl_stable_hash_for!(struct ast::Ident {
192174} ) ;
193175
194176impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: TraitItem {
195- fn hash_stable < W : StableHasherResult > ( & self ,
196- hcx : & mut StableHashingContext < ' a > ,
197- hasher : & mut StableHasher < W > ) {
177+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
198178 let hir:: TraitItem {
199179 hir_id : _,
200180 ident,
@@ -216,9 +196,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::TraitItem {
216196
217197
218198impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: ImplItem {
219- fn hash_stable < W : StableHasherResult > ( & self ,
220- hcx : & mut StableHashingContext < ' a > ,
221- hasher : & mut StableHasher < W > ) {
199+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
222200 let hir:: ImplItem {
223201 hir_id : _,
224202 ident,
@@ -248,9 +226,7 @@ impl_stable_hash_for!(enum ast::CrateSugar {
248226} ) ;
249227
250228impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: VisibilityKind {
251- fn hash_stable < W : StableHasherResult > ( & self ,
252- hcx : & mut StableHashingContext < ' a > ,
253- hasher : & mut StableHasher < W > ) {
229+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
254230 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
255231 match * self {
256232 hir:: VisibilityKind :: Public |
@@ -273,9 +249,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::VisibilityKind {
273249impl_stable_hash_for_spanned ! ( hir:: VisibilityKind ) ;
274250
275251impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Mod {
276- fn hash_stable < W : StableHasherResult > ( & self ,
277- hcx : & mut StableHashingContext < ' a > ,
278- hasher : & mut StableHasher < W > ) {
252+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
279253 let hir:: Mod {
280254 inner : ref inner_span,
281255 ref item_ids,
@@ -305,9 +279,7 @@ impl_stable_hash_for_spanned!(hir::Variant);
305279
306280
307281impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Item {
308- fn hash_stable < W : StableHasherResult > ( & self ,
309- hcx : & mut StableHashingContext < ' a > ,
310- hasher : & mut StableHasher < W > ) {
282+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
311283 let hir:: Item {
312284 ident,
313285 ref attrs,
@@ -328,9 +300,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Item {
328300}
329301
330302impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Body {
331- fn hash_stable < W : StableHasherResult > ( & self ,
332- hcx : & mut StableHashingContext < ' a > ,
333- hasher : & mut StableHasher < W > ) {
303+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
334304 let hir:: Body {
335305 params,
336306 value,
@@ -359,9 +329,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::BodyId {
359329
360330impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: def_id:: DefIndex {
361331
362- fn hash_stable < W : StableHasherResult > ( & self ,
363- hcx : & mut StableHashingContext < ' a > ,
364- hasher : & mut StableHasher < W > ) {
332+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
365333 hcx. local_def_path_hash ( * self ) . hash_stable ( hcx, hasher) ;
366334 }
367335}
@@ -376,17 +344,13 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::def_id::DefIndex {
376344}
377345
378346impl < ' a > HashStable < StableHashingContext < ' a > > for crate :: middle:: lang_items:: LangItem {
379- fn hash_stable < W : StableHasherResult > ( & self ,
380- _: & mut StableHashingContext < ' a > ,
381- hasher : & mut StableHasher < W > ) {
347+ fn hash_stable ( & self , _: & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
382348 :: std:: hash:: Hash :: hash ( self , hasher) ;
383349 }
384350}
385351
386352impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: TraitCandidate {
387- fn hash_stable < W : StableHasherResult > ( & self ,
388- hcx : & mut StableHashingContext < ' a > ,
389- hasher : & mut StableHasher < W > ) {
353+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
390354 hcx. with_node_id_hashing_mode ( NodeIdHashingMode :: HashDefPath , |hcx| {
391355 let hir:: TraitCandidate {
392356 def_id,
@@ -418,17 +382,13 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::TraitCandidate {
418382}
419383
420384impl < ' hir > HashStable < StableHashingContext < ' hir > > for attr:: InlineAttr {
421- fn hash_stable < W : StableHasherResult > ( & self ,
422- hcx : & mut StableHashingContext < ' hir > ,
423- hasher : & mut StableHasher < W > ) {
385+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' hir > , hasher : & mut StableHasher ) {
424386 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
425387 }
426388}
427389
428390impl < ' hir > HashStable < StableHashingContext < ' hir > > for attr:: OptimizeAttr {
429- fn hash_stable < W : StableHasherResult > ( & self ,
430- hcx : & mut StableHashingContext < ' hir > ,
431- hasher : & mut StableHasher < W > ) {
391+ fn hash_stable ( & self , hcx : & mut StableHashingContext < ' hir > , hasher : & mut StableHasher ) {
432392 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
433393 }
434394}
0 commit comments