Skip to content

Rustdoc: in "Blanket Implementations" list for a given type, show std traits separately from non-std traits #82449

@abonander

Description

@abonander

The "Blanket Implementations" section has a high noise level since it lists a lot of traits that you tend to assume every type implements:

  • Any
  • Borrow<T> for T
  • BorrowMut<T> for T
  • From<T> for T
  • Into<T> for T
  • ToOwned (for types implementing Clone)
  • TryFrom<T> for T
  • TryInto<T> for T

For example, blake2::Blake2b has this issue where the important blanket impl of Digest is easy to miss amongst all the std traits: https://www.reddit.com/r/rust/comments/lpgw1n/hey_rustaceans_got_an_easy_question_ask_here_82021/gohdi07/?context=10000

For this reason, I'd like to see blanket impls of std traits listed separately, preferably below traits that aren't from std. Perhaps this shouldn't just apply to the "Blanket Implementations" section but the main "Trait Implementations" section as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions