2 Checks for calls to `core::mem::swap` where either parameter is derived from a pointer
5 When at least one parameter to `swap` is derived from a pointer it may overlap with the
6 other. This would then lead to undefined behavior.
10 unsafe fn swap(x: &[*mut u32], y: &[*mut u32]) {
11 for (&x, &y) in x.iter().zip(y) {
12 core::mem::swap(&mut *x, &mut *y);
18 unsafe fn swap(x: &[*mut u32], y: &[*mut u32]) {
19 for (&x, &y) in x.iter().zip(y) {
20 core::ptr::swap(x, y);