Skip to content

Commit 535f4f4

Browse files
committed
Allow mir::Place to be used as a key in hashtables.
1 parent f791b4f commit 535f4f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/mir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ impl<'tcx> Debug for Statement<'tcx> {
11361136

11371137
/// A path to a value; something that can be evaluated without
11381138
/// changing or disturbing program state.
1139-
#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable)]
1139+
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
11401140
pub enum Place<'tcx> {
11411141
/// local variable
11421142
Local(Local),
@@ -1150,7 +1150,7 @@ pub enum Place<'tcx> {
11501150

11511151
/// The def-id of a static, along with its normalized type (which is
11521152
/// stored to avoid requiring normalization when reading MIR).
1153-
#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable)]
1153+
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
11541154
pub struct Static<'tcx> {
11551155
pub def_id: DefId,
11561156
pub ty: Ty<'tcx>,

0 commit comments

Comments
 (0)