# \#\[derive(All)\]

**URL:** <https://internals.rust-lang.org/t/derive-all/21937>\
**Category:** language design\
**Created:** [November 29, 2024, 2:44pm UTC](https://internals.rust-lang.org/t/derive-all/21937 "2024-11-29T14:44:54Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![Neutron3529](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/neutron3529/32/6976_2.png) [@Neutron3529](https://internals.rust-lang.org/u/Neutron3529)\
**Post date:** [December 5, 2024, 9:12am UTC](https://internals.rust-lang.org/t/derive-all/21937/20 "2024-12-05T09:12:42Z")

</div>

Maybe duplicated to [this thread](https://internals.rust-lang.org/t/discussion-better-derive-for-trait-eq)

It should be better to just have a

```rust
#[derive(Copy, Ord)]
struct Foo;

```

rather than

```rust
#[derive(Copy, Clone, PartialEq, PartialOrd, Eq, Ord)]
struct Foo;

```

Actually we could auto implement higher trait for lower traits. In case we have Ord, we should have Eq and PartialOrd automatically.

---

_[View the full topic](https://internals.rust-lang.org/t/derive-all/21937)._
