Skip to content

[rustdoc] Fix rustc_private items being marked as unstable in the search results - #166502

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
GuillaumeGomez:rustc_private-unstable
Nov 25, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
GuillaumeGomez:rustc_private-unstable

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up of #153746.

Before:

Screenshot From 2026-11-24 16-12-07

After:

Screenshot From 2026-11-24 16-11-57

The fix was to also check if the unstable stability was coming from rustc_private (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau

@rustbot rustbot added A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature 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 Nov 24, 2026

/// Returns `true` is the stability is unstable and isn't a `rustc_private` feature.
#[inline]
pub(crate) fn stability_is_unstable(stability: Option<rustc_attr_ir::Stability>) -> bool {

@GuillaumeGomez GuillaumeGomez Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I centralized it in hope that in the future, if a similar cases arises, we won't miss it. :')

View changes since the review

Comment on lines +503 to +504
unstable: entry.item.unstable,
deprecated: entry.item.deprecated,

@GuillaumeGomez GuillaumeGomez Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to actually check these two attributes (even though we only check unstable so far).

View changes since the review

const EXPECTED = {
'query': 'std_path',
'others': [
{ 'path': 'force_unstable', 'name': 'std_path', 'unstable': false },

@GuillaumeGomez GuillaumeGomez Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this fix, this item was also considered unstable.

View changes since the review

@Urgau Urgau left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 357df6b has been tentatively approved by Urgau

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 Nov 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ble, r=Urgau

[rustdoc] Fix rustc_private items being marked as unstable in the search results

Follow-up of rust-lang#153746.

Before:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-12-07" src="https://github.com/user-attachments/assets/702def0d-f84d-49d3-b3b7-3d4d5a90162e" />

After:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-11-57" src="https://github.com/user-attachments/assets/4d1c0004-8787-4aae-8cae-9da2c0fb0281" />

The fix was to also check if the `unstable` stability was coming from `rustc_private` (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ble, r=Urgau

[rustdoc] Fix rustc_private items being marked as unstable in the search results

Follow-up of rust-lang#153746.

Before:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-12-07" src="https://github.com/user-attachments/assets/702def0d-f84d-49d3-b3b7-3d4d5a90162e" />

After:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-11-57" src="https://github.com/user-attachments/assets/4d1c0004-8787-4aae-8cae-9da2c0fb0281" />

The fix was to also check if the `unstable` stability was coming from `rustc_private` (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ble, r=Urgau

[rustdoc] Fix rustc_private items being marked as unstable in the search results

Follow-up of rust-lang#153746.

Before:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-12-07" src="https://github.com/user-attachments/assets/702def0d-f84d-49d3-b3b7-3d4d5a90162e" />

After:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-11-57" src="https://github.com/user-attachments/assets/4d1c0004-8787-4aae-8cae-9da2c0fb0281" />

The fix was to also check if the `unstable` stability was coming from `rustc_private` (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ble, r=Urgau

[rustdoc] Fix rustc_private items being marked as unstable in the search results

Follow-up of rust-lang#153746.

Before:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-12-07" src="https://github.com/user-attachments/assets/702def0d-f84d-49d3-b3b7-3d4d5a90162e" />

After:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-11-57" src="https://github.com/user-attachments/assets/4d1c0004-8787-4aae-8cae-9da2c0fb0281" />

The fix was to also check if the `unstable` stability was coming from `rustc_private` (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup of 15 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166429 (1.100.1 relnotes)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
 - #166521 (Not-so-pointless change to hashbrown subtree)
@rust-bors
rust-bors Bot merged commit dddd076 into rust-lang:main Nov 25, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 25, 2026
Rollup merge of #166502 - GuillaumeGomez:rustc_private-unstable, r=Urgau

[rustdoc] Fix rustc_private items being marked as unstable in the search results

Follow-up of #153746.

Before:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-12-07" src="https://github.com/user-attachments/assets/702def0d-f84d-49d3-b3b7-3d4d5a90162e" />

After:

<img width="633" height="325" alt="Screenshot From 2026-11-24 16-11-57" src="https://github.com/user-attachments/assets/4d1c0004-8787-4aae-8cae-9da2c0fb0281" />

The fix was to also check if the `unstable` stability was coming from `rustc_private` (which we already did when rendering an item).

cc @lolbinarycat
r? @Urgau
clarfonthey pushed a commit to clarfonthey/hashbrown that referenced this pull request Nov 25, 2026
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations)
 - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions)
 - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals)
 - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds)
 - rust-lang/rust#166500 (Fix float zero patterns after a failed guard)
 - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge)
 - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity)
 - rust-lang/rust#166429 (1.100.1 relnotes)
 - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress)
 - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets)
 - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - rust-lang/rust#166511 (Documentation: clarify Termination::report doc)
 - rust-lang/rust#166514 (coroutine: unify the word choice)
 - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
@GuillaumeGomez
GuillaumeGomez deleted the rustc_private-unstable branch November 25, 2026 10:52
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Nov 26, 2026
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations)
 - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions)
 - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals)
 - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds)
 - rust-lang/rust#166500 (Fix float zero patterns after a failed guard)
 - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge)
 - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity)
 - rust-lang/rust#166429 (1.100.1 relnotes)
 - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress)
 - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets)
 - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - rust-lang/rust#166511 (Documentation: clarify Termination::report doc)
 - rust-lang/rust#166514 (coroutine: unify the word choice)
 - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature 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.

3 participants