77
88use std:: hash:: { Hash , Hasher } ;
99
10- use rustc:: ich:: { StableHashingContextProvider , StableHashingContext } ;
10+ use rustc:: ich:: StableHashingContextProvider ;
1111use rustc:: mir;
1212use rustc:: mir:: interpret:: {
1313 AllocId , Pointer , Scalar ,
@@ -19,7 +19,7 @@ use rustc::ty::{self, TyCtxt};
1919use rustc:: ty:: layout:: Align ;
2020use rustc_data_structures:: fx:: FxHashSet ;
2121use rustc_data_structures:: indexed_vec:: IndexVec ;
22- use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher , StableHasherResult } ;
22+ use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
2323use syntax:: ast:: Mutability ;
2424use syntax:: source_map:: Span ;
2525
@@ -366,16 +366,10 @@ impl<'a, 'tcx, Ctx> Snapshot<'a, Ctx> for &'a LocalValue<'tcx>
366366 }
367367}
368368
369-
370- impl < ' a , ' gcx > HashStable < StableHashingContext < ' a > > for LocalValue < ' gcx > {
371- fn hash_stable < W : StableHasherResult > (
372- & self ,
373- hcx : & mut StableHashingContext < ' a > ,
374- hasher : & mut StableHasher < W > ,
375- ) {
376- self . state . hash_stable ( hcx, hasher) ;
377- }
378- }
369+ impl_stable_hash_for ! ( struct LocalValue <' tcx> {
370+ state,
371+ layout -> _,
372+ } ) ;
379373
380374impl < ' a , ' b , ' mir , ' tcx : ' a +' mir > SnapshotContext < ' b >
381375 for Memory < ' a , ' mir , ' tcx , CompileTimeInterpreter < ' a , ' mir , ' tcx > >
0 commit comments