2022-06-04 06:34:07 -05:00
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/swap_ptr_to_ref.rs:11:9
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
|
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`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::swap_ptr_to_ref)]`
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/swap_ptr_to_ref.rs:12:9
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/swap_ptr_to_ref.rs:13:9
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/swap_ptr_to_ref.rs:14:9
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|