implement unsafe pointer methods by Gankra · Pull Request #43964 · rust-lang/rust (original) (raw)
It is not clear to me from the documentation whether these methods may or may not be used with unaligned pointers: *offset
methods, *add
and *sub
methods, copy*
methods, *_volatile
methods, drop_in_place
, *_bytes
methods, replace
, swap
.
Should I simply assume that they are safe to use with unaligned pointers, unless explicitly stated?
It'd be nice if the Safety
section of every method mentioned whether unaligned pointers are allowed anyway.
Other than that, LGTM.