]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/common.rs
use TotalEq for HashMap
[rust.git] / src / librustc / middle / trans / common.rs
index 9787e9228bf9105d4896e9d40634eff3b003f716..78700bab3f24d55a81bd3f1c6b75898fe22a5464 100644 (file)
@@ -710,7 +710,7 @@ pub fn is_null(val: ValueRef) -> bool {
 }
 
 // Used to identify cached monomorphized functions and vtables
-#[deriving(Eq, Hash)]
+#[deriving(Eq, TotalEq, Hash)]
 pub enum mono_param_id {
     mono_precise(ty::t, Option<@Vec<mono_id> >),
     mono_any,
@@ -720,7 +720,7 @@ pub enum mono_param_id {
               datum::RvalueMode),
 }
 
-#[deriving(Eq, Hash)]
+#[deriving(Eq, TotalEq, Hash)]
 pub enum MonoDataClass {
     MonoBits,    // Anything not treated differently from arbitrary integer data
     MonoNonNull, // Non-null pointers (used for optional-pointer optimization)
@@ -742,7 +742,7 @@ pub fn mono_data_classify(t: ty::t) -> MonoDataClass {
     }
 }
 
-#[deriving(Eq, Hash)]
+#[deriving(Eq, TotalEq, Hash)]
 pub struct mono_id_ {
     def: ast::DefId,
     params: Vec<mono_param_id> }