-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Some docs about pointers recommend addr_of
macros instead of &raw
#133024
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Libs-Small
Libs issues that are considered "small" or self-contained
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Comments
@rustbot claim |
#133048 doesn't fix the reference in Primitive type pointer (which, incidentally, doesn't end in a period, whereas the other entries in that list do) |
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Nov 15, 2024
use `&raw` in `{read, write}_unaligned` documentation Fixes rust-lang#133024 by using `&raw const` and `&raw mut` instead of `addr_of!` and `addr_of_mut!`.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Nov 15, 2024
Rollup merge of rust-lang#133048 - cyrgani:ptr-doc-update, r=Amanieu use `&raw` in `{read, write}_unaligned` documentation Fixes rust-lang#133024 by using `&raw const` and `&raw mut` instead of `addr_of!` and `addr_of_mut!`.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 22, 2024
Use `&raw` for `ptr` primitive docs Fixes the first item in rust-lang#133024
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 22, 2024
Rollup merge of rust-lang#134630 - fifty-six:master, r=workingjubilee Use `&raw` for `ptr` primitive docs Fixes the first item in rust-lang#133024
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this issue
Mar 11, 2025
Use `&raw` for `ptr` primitive docs Fixes the first item in rust-lang#133024
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
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Libs-Small
Libs issues that are considered "small" or self-contained
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Location
Primitive type pointer
core::ptr::read_unaligned
core::ptr::write_unaligned
Summary
The above documentation pages suggest using
ptr::addr_of
andptr::addr_of_mut
respectively, but the pages for those macros recommend using&raw const
and&raw mut
instead.The text was updated successfully, but these errors were encountered: