mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
7257e9c2de
Add support for `ptr::write`s for the `invalid_reference_casting` lint This PR adds support for `ptr::write` and others for the `invalid_reference_casting` lint. Detecting instances where instead of using the deref (`*`) operator to assign someone uses `ptr::write`, `ptr::write_unaligned` or `ptr::write_volatile`. ```rust let data_len = 5u64; std::ptr::write( std::mem::transmute::<*const u64, *mut u64>(&data_len), new_data_len, ); ``` r? ``@est31`` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@e1c49fbd61 | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@d77878b729 | ||
sysroot | ||
test | ||
unwind |