Derive TotalEq for std::intrinsics::TypeId

HashMap and HashSet require keys to implement TotalEq. This makes it possible to use TypeId as a HashMap key again.
This commit is contained in:
Tomas Sedovic 2014-03-26 15:43:01 +01:00
parent 0908ffa660
commit 4d6c47bcce

View File

@ -451,7 +451,7 @@ extern "rust-intrinsic" {
/// `TypeId` represents a globally unique identifier for a type
#[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and
// middle/lang_items.rs
#[deriving(Eq, Hash, Show)]
#[deriving(Eq, Hash, Show, TotalEq)]
#[cfg(not(test))]
pub struct TypeId {
priv t: u64,