Skip to content

Sealed traits for rustdoc #68235

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
Mark-Simulacrum opened this issue Jan 14, 2020 · 0 comments
Open

Sealed traits for rustdoc #68235

Mark-Simulacrum opened this issue Jan 14, 2020 · 0 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-trait-system Area: Trait system C-feature-request Category: A feature request, i.e: not implemented / a PR. 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

@Mark-Simulacrum
Copy link
Member

In #67562, it was proposed to make trait Any an unsafe trait. This was ultimately rejected, as we do not currently want downstream users to see that it is unsafe. However, we wanted a way to have both. The suggestion is that rustdoc could have an (unstable, for now) attribute that indicates that a trait is "sealed," in the sense that no upstream impls are permitted.

rustdoc would then show this trait as unimplementable. It would not show any unsafety on the trait (as it is then irrelevant to readers of the documentation).

See #67562 (comment), #67562 (comment).

@Mark-Simulacrum Mark-Simulacrum added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 14, 2020
@jyn514 jyn514 added A-trait-system Area: Trait system C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Nov 4, 2020
@fmease fmease added A-trait-system Area: Trait system A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. and removed A-trait-system Area: Trait system labels Dec 21, 2024
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) A-trait-system Area: Trait system C-feature-request Category: A feature request, i.e: not implemented / a PR. 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