Skip to content

Document the traits that are #[derive]-able #29711

Closed
@mackwic

Description

@mackwic

Hi Rust !

Neither on the reference nor the doc of the trait itself inform us of the derivability of the standard traits.

It would be great to have the list of all the derivable traits in the Reference, and each trait could have a note in its doc saying that this trait is automagically derivable.

Also, it could be worth pointing some of the issues with deriving in the doc.
A quick search showed me some lifetimes error in some special cases, and performance issue for large enums. This is something that could be in the doc of the traits with these known issues using auto-deriving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions