Skip to content

Document builtin attributes (like no_mangle, repr, ...) in the standard library docs #141123

Open
@Veykril

Description

@Veykril

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

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-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libsRelevant 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions