Description
The docs state that overlap is permitted, which is intended to cover the lhs==rhs case, but don't specify what that means for partial overlap. For instance:
let mut x = [0u32, 1, 2];
let a = &mut x[0] as *mut _ as *mut[u32; 2];
let b = &mut x[1] as *mut _ as *mut[u32; 2];
ptr::swap(a, b);
// Today: [1, 0, 1]
println!("{:?}", x);
Reasonable implementations are forced to produce either 0 or 2 for the middle value. We should definitely at least spec that that happens. If we want to be Extra Helpful, we can specify that 0 is used, because there's basically no reason to change this behaviour, or for a different impl to diverge.
Something like "if the LHS and RHS overlap, then the overlapping region of memory will be derived from the LHS", along with the above example to clarify.
A nice thing about specifying it is that, because it's otherwise symmetric, you can swap your lhs/rhs to choose exactly which half you want to "win".