Skip to content

Sealed traits for rustdoc #68235

Open
Open
@Mark-Simulacrum

Description

@Mark-Simulacrum

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)A-trait-systemArea: Trait systemC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions