auto merge of #13154 : tomassedovic/rust/patch-1, r=alexcrichton

HashMap and HashSet require keys to implement TotalEq. This makes it possible to use TypeId as a HashMap key again.

Question for reviewers: assuming we want to support `HashMap<TypeId, whatever>`, would it make sense to add a relevant test? If so, should it go to libcollections or libstd?
This commit is contained in:
bors 2014-03-28 04:26:48 -07:00
commit 794ee03390

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,