Skip to content

Commit 9153a34

Browse files
committed
Constify TypeId ordering impls
1 parent bde4ba1 commit 9153a34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/any.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,8 @@ impl dyn Any + Send + Sync {
662662
/// While `TypeId` implements `Hash`, `PartialOrd`, and `Ord`, it is worth
663663
/// noting that the hashes and ordering will vary between Rust releases. Beware
664664
/// of relying on them inside of your code!
665-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
665+
#[derive(Clone, Copy, Debug, Hash, Eq)]
666+
#[derive_const(PartialEq, PartialOrd, Ord)]
666667
#[stable(feature = "rust1", since = "1.0.0")]
667668
pub struct TypeId {
668669
t: u64,

0 commit comments

Comments
 (0)