rust-lang / rust-lang/rust

rustdoc: toggle to show private items in rustdoc

Open
#141,114 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

requested by rust4linux, will be an opt-in nightly only feature at first.

the core bit of code would be something like document.querySelectorAll("dt:has([title='Restricted Visibility'])").forEach(x => x.hidden = true) on a button/toggle. we probably want to add a css class for hidden items.

how it interacts with the search index is complicated, so the first MVP will likely not affect rustdoc search at all

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

No files or tests are named. Start by locating rustdoc's generated HTML, frontend controls, and styles for restricted-visibility items; use the proposed selector and CSS class as the MVP boundary. Done means an opt-in nightly toggle hides or shows private items while leaving rustdoc search unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, rust
Domain
documentation, frontend
Issue type
Feature
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.