-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Document builtin attributes (like no_mangle, repr, ...) in the standard library docs #141123
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Location
https://doc.rust-lang.org/std/
Summary
The standard library docs currently document keywords on the main index https://doc.rust-lang.org/std/#keywords
I propose we should do the same for builtin language attributes (
no_mangle,repr,no_std), but notably not builtin attribute macros (test,bench) as those are already described by nature of being proper macros exposed from the standard libraries.They should be using a similar mechanism as to how keywords are documented, dummy modules with doc strings. That way tooling like IDEs can render these docs on hover of the builtin language attributes.
cc @GuillaumeGomez