Skip to content

Commit 4d6c47b

Browse files
committed
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.
1 parent 0908ffa commit 4d6c47b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/intrinsics.rs

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

0 commit comments

Comments
 (0)