[CODE IMPROVEMENT] handle `doc(hidden)` differently in rustdoc
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently, the handle of doc(hidden) in rustdoc is very complex and needs to go through multiple strip passes which are all very fine-tuned, making the whole very fragile and difficult to keep up with.
Instead of these passes, we could instead check whether or not an item is doc hidden directly when rendering them. With a top-down approach, if an item is doc(hidden), none of its children will be rendered either.
Gonna give it a try in the few weeks to see how much of it is actually doable.
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
The issue does not name specific files, tests, or entry points; begin by tracing rustdoc's current handling of doc(hidden) and its multiple strip passes. Define the top-down rendering behavior and verify that hidden items and their children are consistently excluded without the existing fragile passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100