mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
23 lines
901 B
Plaintext
23 lines
901 B
Plaintext
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref_unfixable.rs:14:9
|
|
|
|
|
LL | core::mem::swap(addr_of_mut_to_ref!(x), &mut *y);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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_unfixable.rs:15:9
|
|
|
|
|
LL | core::mem::swap(&mut *y, addr_of_mut_to_ref!(x));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: call to `core::mem::swap` with a parameter derived from a raw pointer
|
|
--> $DIR/swap_ptr_to_ref_unfixable.rs:16:9
|
|
|
|
|
LL | core::mem::swap(addr_of_mut_to_ref!(x), addr_of_mut_to_ref!(x));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 3 previous errors
|
|
|