Skip to content

[rustdoc] Add tests for #[doc(hidden)] handling of items. #143665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

obi1kenobi
Copy link
Member

@obi1kenobi obi1kenobi commented Jul 9, 2025

Add tests which check:

  • #[doc(hidden)] items are not present in rustdoc JSON output by default.
  • Invoking rustdoc with --document-hidden-items makes #[doc(hidden)] items appear, and they show their #[doc(hidden)] status appropriately.

r? @aDotInTheVoid

@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2025

aDotInTheVoid is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2025

These commits modify tests/rustdoc-json.
rustdoc-json is a public (but unstable) interface.

Please ensure that if you've changed the output:

  • It's intentional.
  • The FORMAT_VERSION in src/librustdoc-json-types is bumped if necessary.

cc @aDotInTheVoid, @obi1kenobi

@obi1kenobi obi1kenobi force-pushed the pg/doc-hidden-tests branch from 0dfd729 to 083b572 Compare July 9, 2025 02:07
@obi1kenobi
Copy link
Member Author

Removed the HTML test changes, only including the rustdoc JSON tests.

@obi1kenobi obi1kenobi requested a review from fmease July 9, 2025 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants