rustdoc: Please use sticky headers for impl blocks
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
If you have a long rustdoc page with different impl blocks for the same type, such as https://doc.rust-lang.org/1.82.0/std/primitive.slice.html , each of which has various methods, it's really easy to lose track of which impl block a method is in.
I'd love to see rustdoc use "sticky" headings for impl blocks, which stay visible while scrolling through the contents of the impl block, and scroll away when past that impl block. This should be possible with a bit of CSS (no JavaScript required).
This came up when discussing some methods we wanted to add to [MaybeUninit<T>].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the rustdoc page structure for impl-block headings and the CSS used by generated documentation, using the linked slice documentation page as a reference. Confirm that impl headings remain visible while scrolling within their block and scroll away after the block ends, without JavaScript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100