Function ptr_rotate_memmove

pub(in ::slice::rotate) const unsafe fn ptr_rotate_memmove<T>(left: usize, mid: *mut T, right: usize)

Algorithm 1 is used if min(left, right) is small enough to fit onto a stack buffer. The min(left, right) elements are copied onto the buffer, memmove is applied to the others, and the ones on the buffer are moved back into the hole on the opposite side of where they originated.

Safety

The specified range must be valid for reading and writing.