rust-lang / rust-lang/rust

Improve rustdoc strippers

Open
#138,168 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-technical-debt C-cleanup T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Currently, rustdoc goes through multiple passes to inline reexports, remove hidden/private items.

First, we go through the whole crate AST, to convert types into rustdoc types (although the rustdoc types are now more and more just wrapper around rustc types), then we run these passes. However: couldn't we do the stripping as part of this conversion?

It could also potentially help with performance in cases like #137534.

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

Start by tracing rustdoc's whole-crate AST conversion into rustdoc types, then follow the passes that inline reexports and remove hidden or private items. Determine whether stripping can be folded into that conversion without changing rustdoc behavior, and compare performance against the existing passes, including the case referenced by #137534.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.