about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJoseph Perez <joperez@hotmail.fr>2025-05-07 00:11:05 +0200
committerGitHub <noreply@github.com>2025-05-07 00:11:05 +0200
commit49ac393688510f0f36627f5899bf0ededd26a8de (patch)
tree12ad3c5eb0cdecda2ffb09cc7cc986dc33e51e70 /compiler/rustc_codegen_llvm/src
parent27d6200a70601f6fcf419bf2f9e37989f3624ca4 (diff)
downloadrust-49ac393688510f0f36627f5899bf0ededd26a8de.tar.gz
rust-49ac393688510f0f36627f5899bf0ededd26a8de.zip
fix typo in autorefs lint doc example
The documentation is talking about other way using only raw pointers, but the example was use `std::slice::from_raw_parts_mut` which also create a reference. `std::ptr::slice_from_raw_parts_mut` should be used instead, and it also highlights the benefit of raw pointer manipulation compared to dereference, as the function doesn't need to be unsafe anymore.

Moreover, [`unsafe_op_in_unsafe_fn`](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html) warning has been enabled since Edition 2024, so I've updated the examples to use unsafe blocks.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions