Skip to content

Commit 0d0e021

Browse files
Derive Eq and Hash for types used in Miri's evaluator
1 parent b3b04b8 commit 0d0e021

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/mir/interpret/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use ty::codec::TyDecoder;
3636
use std::sync::atomic::{AtomicU32, Ordering};
3737
use std::num::NonZeroU32;
3838

39-
#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)]
39+
#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
4040
pub enum Lock {
4141
NoLock,
4242
WriteLock(DynamicLifetime),

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ impl Debug for ValidationOp {
16241624
}
16251625

16261626
// This is generic so that it can be reused by miri
1627-
#[derive(Clone, RustcEncodable, RustcDecodable)]
1627+
#[derive(Clone, Hash, PartialEq, Eq, RustcEncodable, RustcDecodable)]
16281628
pub struct ValidationOperand<'tcx, T> {
16291629
pub place: T,
16301630
pub ty: Ty<'tcx>,

0 commit comments

Comments
 (0)