rust-lang / rust-lang/rust

On the rustdoc page for type `T`, the sidebar section "Trait Implementations" lists `impl A<T> for U` items identically for all `U`

Open
#143,123 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-rustdoc-ui T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Consider https://doc.rust-lang.org/std/primitive.u32.html. In the sidebar, scroll to "Trait Implementations" and you will see this (similar for many other traits, such as Add and Shl):

Screenshot

This is hard to use because you have to hover over each of them and check the URL to see what it is.

Maybe the for part should be included in the hyperlink text if they'd otherwise be identical. Or maybe with a nested list so it fits more easily into the narrow sidebar:

  • From<bool>
  • From<char>
  • From<u8>
  • From<u32>
    • for AtomicU32
    • for Ipv4Addr
    • for f128
    • ...

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

Reproduce the sidebar behavior on the linked std::primitive.u32.html page and inspect the rustdoc implementation that generates the "Trait Implementations" section. Compare the proposed hyperlink and nested-list presentations, then verify that implementations with different target types are distinguishable in the rendered sidebar.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.