Closed
Description
Clippy may not be able to see when this is acceptable but if so there are several functions that can handle unaligned ptrs. If the unaligned pointer is only used as an input to those then it ideally wouldn't be flagged.
The obvious
std::ptr::read_unaligned
std::ptr::write_unaligned
Anything with memcpy or memmove semantics
std::ptr::copy
std::ptr::copy_nonoverlapping
I'm unsure about std::ptr::swap and std::ptr::swap_nonoverlapping
And in
std::arch::x86_64
std::arch::x86
storeu
loadu
lddqu
There might be some others.