Skip to content

Document the contextual keyword raw #134447

@CrazyboyQCD

Description

@CrazyboyQCD

Related with #34601, #127679.

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Dec 18, 2024
changed the title [-]Document the `raw` keyword[/-] [+]Document the contextual keyword `raw`[/+] on Dec 18, 2024
added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
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.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
T-libsRelevant to the library team, which will review and decide on the PR/issue.
on Dec 18, 2024
fmease

fmease commented on Dec 18, 2024

@fmease
Member

While it would be straightforward to add a "keyword page" for raw by adding the following to library/std/src/keyword_docs.rs:

#[doc(keyword = "raw")]
/// ...
mod raw_keyword {}

I think ideally we want to mark it as a contextual keyword in some way and e.g., reflect that characteristic in the section header prefix.

fmease

fmease commented on Dec 18, 2024

@fmease
Member

However, we don't mark union specially either despite it being a contextual keyword, too. So I guess, take it away!

added
T-libsRelevant to the library team, which will review and decide on the PR/issue.
A-raw-pointersArea: raw pointers, MaybeUninit, NonNull
and removed
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Dec 18, 2024
fmease

fmease commented on Dec 21, 2024

@fmease
Member

Only tangentially related: We should probably also document the Rust ≥2024 contextual keyword safe I just noticed.

hkBst

hkBst commented on Jan 20, 2025

@hkBst
Member

Maybe raw could be integrated into https://doc.rust-lang.org/std/primitive.reference.html mostly by contrasting it with non-raw references?

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on May 11, 2025
lolbinarycat

lolbinarycat commented on May 11, 2025

@lolbinarycat
Contributor

adding T-rustdoc as that's where a "this is a contextual keyword" would need to be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-raw-pointersArea: raw pointers, MaybeUninit, NonNullC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.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

        Participants

        @fmease@lolbinarycat@hkBst@rustbot@CrazyboyQCD

        Issue actions

          Document the contextual keyword `raw` · Issue #134447 · rust-lang/rust