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:
commit
794ee03390
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue