Revert expansion of impl HashStable for Frame.
This commit is contained in:
parent
4da5fe7fdb
commit
579625b9e7
@ -3,7 +3,6 @@ use std::fmt::Write;
|
||||
use std::mem;
|
||||
|
||||
use syntax::source_map::{self, Span, DUMMY_SP};
|
||||
use rustc::ich::StableHashingContext;
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::hir::def::DefKind;
|
||||
use rustc::mir;
|
||||
@ -19,7 +18,6 @@ use rustc::mir::interpret::{
|
||||
InterpResult, truncate, sign_extend,
|
||||
};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_macros::HashStable;
|
||||
|
||||
use super::{
|
||||
@ -831,21 +829,3 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
frames
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx, 'mir, 'tcx, Tag, Extra> HashStable<StableHashingContext<'ctx>>
|
||||
for Frame<'mir, 'tcx, Tag, Extra>
|
||||
where Extra: HashStable<StableHashingContext<'ctx>>,
|
||||
Tag: HashStable<StableHashingContext<'ctx>>
|
||||
{
|
||||
fn hash_stable(&self, hcx: &mut StableHashingContext<'ctx>, hasher: &mut StableHasher) {
|
||||
self.body.hash_stable(hcx, hasher);
|
||||
self.instance.hash_stable(hcx, hasher);
|
||||
self.span.hash_stable(hcx, hasher);
|
||||
self.return_to_block.hash_stable(hcx, hasher);
|
||||
self.return_place.as_ref().map(|r| &**r).hash_stable(hcx, hasher);
|
||||
self.locals.hash_stable(hcx, hasher);
|
||||
self.block.hash_stable(hcx, hasher);
|
||||
self.stmt.hash_stable(hcx, hasher);
|
||||
self.extra.hash_stable(hcx, hasher);
|
||||
}
|
||||
}
|
||||
|
@ -304,6 +304,18 @@ struct FrameSnapshot<'a, 'tcx> {
|
||||
stmt: usize,
|
||||
}
|
||||
|
||||
impl_stable_hash_for!(impl<> for struct Frame<'mir, 'tcx> {
|
||||
body,
|
||||
instance,
|
||||
span,
|
||||
return_to_block,
|
||||
return_place -> (return_place.as_ref().map(|r| &**r)),
|
||||
locals,
|
||||
block,
|
||||
stmt,
|
||||
extra,
|
||||
});
|
||||
|
||||
impl<'a, 'mir, 'tcx, Ctx> Snapshot<'a, Ctx> for &'a Frame<'mir, 'tcx>
|
||||
where Ctx: SnapshotContext<'a>,
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user