Add PartialOrd, Ord derivations to TypeId
I want to be able to sort a `Vec` of types which contain `TypeId`s, so an `Ord` derivation would be very useful to me. `Hash` already exists, so the missing `PartialOrd` and `Ord` derivations feel like an oversight to me.
This commit is contained in:
parent
0500fbf6ba
commit
6365c4307a
1 changed files with 1 additions and 1 deletions
|
|
@ -338,7 +338,7 @@ impl Any+Send {
|
|||
///
|
||||
/// A `TypeId` is currently only available for types which ascribe to `'static`,
|
||||
/// but this limitation may be removed in the future.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct TypeId {
|
||||
t: u64,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue