Skip to content
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

rustdoc: indicate when a trait has non-defaulted hidden items #138697

Open
GoldsteinE opened this issue Mar 19, 2025 · 0 comments
Open

rustdoc: indicate when a trait has non-defaulted hidden items #138697

GoldsteinE opened this issue Mar 19, 2025 · 0 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

Comments

@GoldsteinE
Copy link
Contributor

There’s a pattern of hiding a non-defaulted item in a trait to mark it as non-implementable, e.g. inventory::Collect:

https://github.com/dtolnay/inventory/blob/5e915d4d197432b73375ad21e08a1ee8275d8309/src/lib.rs#L224-L227

This is primarily useful when a trait is implemented by a macro, so it can’t be properly sealed, but still needs to be only implementable by code “originating” in the same crate. It has some similarity with #[non_exhaustive] attribute.

Some options on how this could look:

Image

Image

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 19, 2025
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. A-rustdoc-ui Area: Rustdoc UI (generated HTML) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 19, 2025
@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

No branches or pull requests

3 participants