Skip to content

Show auto trait and blanket impls for ! #143219

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

Merged
merged 1 commit into from
Jun 30, 2025
Merged

Conversation

zachs18
Copy link
Contributor

@zachs18 zachs18 commented Jun 30, 2025

Add an empty impl ! {} so rustdoc shows auto trait impls and blanket impls on !'s documentation page.

This is already done for unit, tuples, and fn pointers.

cc #97842 @notriddle which added the same for unit and tuple.

Comparison

Before (current):
image

After:
image

@rustbot label A-docs F-never_type

Add an empty `impl ! {}` so `rustdoc` generates auto trait impls and blanket impls on `!`'s documentation page.
@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools F-never_type `#![feature(never_type)]` labels Jun 30, 2025
@tgross35
Copy link
Contributor

Makes sense, thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 30, 2025

📌 Commit d98aaf7 has been approved by tgross35

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 Jun 30, 2025
bors added a commit that referenced this pull request Jun 30, 2025
Rollup of 7 pull requests

Successful merges:

 - #142429 (`tests/ui`: A New Order [13/N])
 - #143066 (Use let chains in the new solver)
 - #143156 (inherit `#[align]` from trait method prototypes)
 - #143176 (fix typos and improve clarity in documentation)
 - #143187 (Add my work email to mailmap)
 - #143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again)
 - #143219 (Show auto trait and blanket impls for `!`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jun 30, 2025
Rollup of 14 pull requests

Successful merges:

 - #142429 (`tests/ui`: A New Order [13/N])
 - #142514 (Miri: handling of SNaN inputs in `f*::pow` operations)
 - #143066 (Use let chains in the new solver)
 - #143090 (Workaround for memory unsafety in third party DLLs)
 - #143118 (`tests/ui`: A New Order [15/N])
 - #143159 (Do not freshen `ReError`)
 - #143168 (`tests/ui`: A New Order [16/N])
 - #143176 (fix typos and improve clarity in documentation)
 - #143187 (Add my work email to mailmap)
 - #143190 (Use the `new` method for `BasicBlockData` and `Statement`)
 - #143195 (`tests/ui`: A New Order [17/N])
 - #143196 (Port #[link_section] to the new attribute parsing infrastructure)
 - #143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again)
 - #143219 (Show auto trait and blanket impls for `!`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c2904f7 into rust-lang:master Jun 30, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jun 30, 2025
Rollup merge of #143219 - zachs18:patch-5, r=tgross35

Show auto trait and blanket impls for `!`

Add an empty `impl ! {}` so rustdoc shows auto trait impls and blanket impls on `!`'s documentation page.

This is already done for [unit](https://github.com/zachs18/rust/blob/2f0ad2a71e4a4528bb80bcb24bf8fa4e50cb87c2/library/core/src/primitive_docs.rs#L493), [tuples](https://github.com/zachs18/rust/blob/2f0ad2a71e4a4528bb80bcb24bf8fa4e50cb87c2/library/core/src/primitive_docs.rs#L1148), and [`fn` pointers](https://github.com/zachs18/rust/blob/2f0ad2a71e4a4528bb80bcb24bf8fa4e50cb87c2/library/core/src/primitive_docs.rs#L1874).

cc #97842 ``@notriddle`` which added the same for unit and tuple.

<details><summary>Comparison</summary>

[Before (current):](https://doc.rust-lang.org/nightly/std/primitive.never.html)
![image](https://github.com/user-attachments/assets/eab8126d-8d65-46d4-8dc7-3680f3162ce3)

After:
![image](https://github.com/user-attachments/assets/e0868113-ebef-4c64-ac30-dfe740d7ea38)
</details>

``@rustbot`` label A-docs F-never_type
@rustbot rustbot added this to the 1.90.0 milestone Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools F-never_type `#![feature(never_type)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants