Skip to content

Commit f0148a5

Browse files
Derive Hash and Eq for some Miri primitives
1 parent 6faae4d commit f0148a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub struct LocalState<'tcx, Tag=(), Id=AllocId> {
121121
}
122122

123123
/// Current value of a local variable
124-
#[derive(Clone, PartialEq, Eq, Debug, HashStable)] // Miri debug-prints these
124+
#[derive(Clone, PartialEq, Eq, Debug, Hash, HashStable)] // Miri debug-prints these
125125
pub enum LocalValue<Tag=(), Id=AllocId> {
126126
/// This local is not currently alive, and cannot be used at all.
127127
Dead,

src/librustc_mir/interpret/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::{
2222
Machine, AllocMap, MayLeak, ErrorHandled, CheckInAllocMsg,
2323
};
2424

25-
#[derive(Debug, PartialEq, Copy, Clone)]
25+
#[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)]
2626
pub enum MemoryKind<T> {
2727
/// Stack memory. Error if deallocated except during a stack pop.
2828
Stack,

0 commit comments

Comments
 (0)