Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the contextual keyword raw #134447

Open
CrazyboyQCD opened this issue Dec 18, 2024 · 3 comments
Open

Document the contextual keyword raw #134447

CrazyboyQCD opened this issue Dec 18, 2024 · 3 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-raw-pointers Area: raw pointers, MaybeUninit, NonNull C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@CrazyboyQCD
Copy link

Related with #34601, #127679.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 18, 2024
@fmease fmease changed the title Document the raw keyword Document the contextual keyword raw Dec 18, 2024
@fmease fmease added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 18, 2024
@fmease
Copy link
Member

fmease commented Dec 18, 2024

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
Copy link
Member

fmease commented Dec 18, 2024

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

@fmease fmease added T-libs Relevant to the library team, which will review and decide on the PR/issue. A-raw-pointers Area: raw pointers, MaybeUninit, NonNull and removed T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 18, 2024
@fmease
Copy link
Member

fmease commented Dec 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-raw-pointers Area: raw pointers, MaybeUninit, NonNull C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants