1 error: call to `core::mem::swap` with a parameter derived from a raw pointer
2 --> $DIR/swap_ptr_to_ref.rs:13:9
4 LL | core::mem::swap(&mut *y, &mut *z);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, z)`
7 = note: `-D clippy::swap-ptr-to-ref` implied by `-D warnings`
9 error: call to `core::mem::swap` with a parameter derived from a raw pointer
10 --> $DIR/swap_ptr_to_ref.rs:14:9
12 LL | core::mem::swap(&mut *y, &mut x);
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, &mut x)`
15 error: call to `core::mem::swap` with a parameter derived from a raw pointer
16 --> $DIR/swap_ptr_to_ref.rs:15:9
18 LL | core::mem::swap(&mut x, &mut *y);
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(&mut x, y)`
21 error: call to `core::mem::swap` with a parameter derived from a raw pointer
22 --> $DIR/swap_ptr_to_ref.rs:16:9
24 LL | core::mem::swap(&mut *addr_of_mut!(x), &mut *addr_of_mut!(x));
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(addr_of_mut!(x), addr_of_mut!(x))`
27 error: aborting due to 4 previous errors