I was writing safety comments for #73622 and need to prove safety when using
ptr::align_offset. However, I wasn't able to find any information about its safety contract in its documentation. Can someone help me? cc @nagisa
align_offset is not unsafe, though?
align_to is, but that's because it effectively transmutes
Oh, I guess you may be referring to the
In that case the implementation here requires that alignment is a power of two, as this is not checked.