mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref.rs:13:9
|
|
|
|
|
LL | core::mem::swap(&mut *y, &mut *z);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, z)`
|
|
|
|
|
= note: `-D clippy::swap-ptr-to-ref` implied by `-D warnings`
|
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref.rs:14:9
|
|
|
|
|
LL | core::mem::swap(&mut *y, &mut x);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, &mut x)`
|
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref.rs:15:9
|
|
|
|
|
LL | core::mem::swap(&mut x, &mut *y);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(&mut x, y)`
|
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref.rs:16:9
|
|
|
|
|
LL | core::mem::swap(&mut *addr_of_mut!(x), &mut *addr_of_mut!(x));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(addr_of_mut!(x), addr_of_mut!(x))`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|