Derive Eq and Hash for types used in Miri's evaluator

This commit is contained in:
Dylan MacKenzie 2018-06-29 13:00:32 -07:00
parent b3b04b8cc6
commit 0d0e021b1c
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ use ty::codec::TyDecoder;
use std::sync::atomic::{AtomicU32, Ordering};
use std::num::NonZeroU32;
#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub enum Lock {
NoLock,
WriteLock(DynamicLifetime),

View File

@ -1624,7 +1624,7 @@ impl Debug for ValidationOp {
}
// This is generic so that it can be reused by miri
#[derive(Clone, RustcEncodable, RustcDecodable)]
#[derive(Clone, Hash, PartialEq, Eq, RustcEncodable, RustcDecodable)]
pub struct ValidationOperand<'tcx, T> {
pub place: T,
pub ty: Ty<'tcx>,