Skip to content

Tracking issue for documenting individual built-in inert attributes in the standard library using #[doc(attribute = "…")] #157604

@fmease

Description

@fmease

Back in August 2025 we merged PR #142472 which added a mechanism for us to document built-in inert attributes in libcore/libstd in the form of a new internal attribute #[doc(attribute = "…")] to be placed on dummy modules. So far though, 9 months later, we haven't actually started documenting any attributes.

Important

Similar to the preexisting "keyword docs" in the std library, these proposed "built-in attribute docs" are not meant to "replace" or "compete" with the Rust Reference!

Instead, they're merely meant to represent a guide-level explanation, not a reference-level one. They're to be written in more beginner-friendly language and they needn't exhaustively describe each attribute.

Finally, each "entry" ought to link to the relevant part of the Rust Reference if available using a relative filesystem path not a URL to allow for offline reading.

If there are any issues with #[doc(attribute = "…")] itself, please create a new issue labeled T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. or open a topic in the #t-rustdoc Zulip channel.

META: TODO: Add checklist of all built-in inert attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-lang-docsRelevant to the lang-docs team.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions