# Pre-RFC: std::cmp::NoOrder

**URL:** <https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514>\
**Category:** libs\
**Created:** [March 6, 2025, 5:56pm UTC](https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514 "2025-03-06T17:56:55Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![bert](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@bert](https://internals.rust-lang.org/u/bert)\
**Post date:** [March 12, 2025, 1:25pm UTC](https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514/21 "2025-03-12T13:25:32Z")

</div>

Attributes seem like the best solution. They can be generalized to all derived traits that imply bounds on generic parameters, such as Clone, Hash, and Default. That said, not sure if I'd call the attribute `#[clone(ignore)]` or something like `#[clone(no_derive_bounds)]`.

---

<div class="post-metadata">

**Author:** ![VincentLagerros](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/vincentlagerros/32/13031_2.png) [@VincentLagerros](https://internals.rust-lang.org/u/VincentLagerros)\
**Post date:** [March 12, 2025, 3:05pm UTC](https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514/22 "2025-03-12T15:05:25Z")

</div>

I just want to add that we cant ignore Ord without ignoring Hash as well, because in the case of a hash collision it would produce two different results as Eq is overridden. This would be a very hard bug to catch with the default hasher, but is easily reproducible with a bad hasher.

So any macro like `#[cmp(ignore)]` would also imply `#[hash(ignore)]`, otherwise we would get very strange behavior.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [September 3, 2026, 3:06pm UTC](https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514/23 "2026-09-03T15:06:14Z")

</div>

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.

[Previous page](https://internals.rust-lang.org/t/pre-rfc-std-noorder/22514.md?page=1)
