rust-lang / rust-lang/rust

Documentation: sorting impls for structs: first crate's own impls, then std impls

Open
#124,826 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Problem

When we generate the documentation for a crate, all the crate implementations are sorted alphabetically. The crate's own traits and the std traits are all mixed together.

trait-order

Proposed Solution

List first the crate's own traits, alphabetically. Then followed by std traits, alphabetically.

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the documentation-generation code that orders struct implementations, then inspect generated documentation for a struct with both crate and std trait implementations. Done means crate traits appear first alphabetically, followed by std traits alphabetically.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.