Skip to content

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
@aDotInTheVoid aDotInTheVoid changed the title [rustdoc] Add tests for #[doc(hidden)] handling of items. [rustdoc-json] Add tests for #[doc(hidden)] handling of items. Jul 9, 2025
@aDotInTheVoid
Copy link
Member

Thanks for writing these, really appreciate you doing the not glamours (but very important) work here.

Tests content is good, but I don't think they should live in tests/rustdoc-json/attrs, as they're not really testing the rendering of attributes, but the items we keep and don't. I think they'd be better suited to a (new) tests/rustdoc-json/visibility folder.

Also, could you edit the commit message to make it clear that this is specifically for rustdoc-json.

r=me with those nits addressed.

@bors delegate+

@bors rollup=always

@bors
Copy link
Collaborator

bors commented Jul 9, 2025

✌️ @obi1kenobi, you can now approve this pull request!

If @aDotInTheVoid told you to "r=me" after making some further change, please make that change, then do @bors r=@aDotInTheVoid

@obi1kenobi obi1kenobi force-pushed the pg/doc-hidden-tests branch from 083b572 to 27fb02c Compare July 10, 2025 00:22
@obi1kenobi
Copy link
Member Author

@bors r=aDotInTheVoid

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit 27fb02c has been approved by aDotInTheVoid

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2025
bors added a commit that referenced this pull request Jul 10, 2025
Rollup of 9 pull requests

Successful merges:

 - #143446 (use `--dynamic-list` for exporting executable symbols)
 - #143590 (Fix weird rustdoc output when single and glob reexport conflict on a name)
 - #143599 (emit `.att_syntax` when global/naked asm use that option)
 - #143615 (Fix handling of no_std targets in `doc::Std` step)
 - #143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations)
 - #143640 (Constify `Fn*` traits)
 - #143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic)
 - #143660 (Disable docs for `compiler-builtins` and `sysroot`)
 - #143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b5d1b92 into rust-lang:master Jul 10, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Jul 10, 2025
Rollup merge of #143665 - obi1kenobi:pg/doc-hidden-tests, r=aDotInTheVoid

[rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.

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 rustbot added this to the 1.90.0 milestone Jul 10, 2025
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 11, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143446 (use `--dynamic-list` for exporting executable symbols)
 - rust-lang/rust#143590 (Fix weird rustdoc output when single and glob reexport conflict on a name)
 - rust-lang/rust#143599 (emit `.att_syntax` when global/naked asm use that option)
 - rust-lang/rust#143615 (Fix handling of no_std targets in `doc::Std` step)
 - rust-lang/rust#143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations)
 - rust-lang/rust#143640 (Constify `Fn*` traits)
 - rust-lang/rust#143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic)
 - rust-lang/rust#143660 (Disable docs for `compiler-builtins` and `sysroot`)
 - rust-lang/rust#143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Jul 12, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143446 (use `--dynamic-list` for exporting executable symbols)
 - rust-lang/rust#143590 (Fix weird rustdoc output when single and glob reexport conflict on a name)
 - rust-lang/rust#143599 (emit `.att_syntax` when global/naked asm use that option)
 - rust-lang/rust#143615 (Fix handling of no_std targets in `doc::Std` step)
 - rust-lang/rust#143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations)
 - rust-lang/rust#143640 (Constify `Fn*` traits)
 - rust-lang/rust#143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic)
 - rust-lang/rust#143660 (Disable docs for `compiler-builtins` and `sysroot`)
 - rust-lang/rust#143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.)

r? `@ghost`
`@rustbot` modify labels: rollup
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants