Skip to content

rustdoc: don't render the auto of auto traits #116268

Open
@fmease

Description

@fmease

Uplifted from #t-lang/Removal of auto trait syntax (comment).

We currently render the contextual keyword auto in the docs of auto traits. E.g., for std::marker::Sync, we display the following code block at the top of the page:

pub unsafe auto trait Sync { }

However, the feature auto_traits is no longer planned to be stabilized1. Instead it will likely be marked as internal soon2.
It might even be possible that the syntax auto trait will be removed altogether (see #116126).

Therefore, I don't think rustdoc should display this effectively internal syntax in the public docs. As a replacement for it, it should add a section or similar to the page of auto traits shortly explaining what the special semantics of the given trait are and potentially link to some more elaborate docs.

If this doesn't get claimed within one month, I will work on it.

Footnotes

  1. #t-lang/Removal of auto trait syntax (comment)

  2. #t-lang/Removal of auto trait syntax (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.P-lowLow priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions