]> git.lizzy.rs Git - rust.git/blob - tests/ui/swap_ptr_to_ref.stderr
Better handle method/function calls
[rust.git] / tests / ui / swap_ptr_to_ref.stderr
1 error: call to `core::mem::swap` with a parameter derived from a raw pointer
2   --> $DIR/swap_ptr_to_ref.rs:13:9
3    |
4 LL |         core::mem::swap(&mut *y, &mut *z);
5    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, z)`
6    |
7    = note: `-D clippy::swap-ptr-to-ref` implied by `-D warnings`
8
9 error: call to `core::mem::swap` with a parameter derived from a raw pointer
10   --> $DIR/swap_ptr_to_ref.rs:14:9
11    |
12 LL |         core::mem::swap(&mut *y, &mut x);
13    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(y, &mut x)`
14
15 error: call to `core::mem::swap` with a parameter derived from a raw pointer
16   --> $DIR/swap_ptr_to_ref.rs:15:9
17    |
18 LL |         core::mem::swap(&mut x, &mut *y);
19    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(&mut x, y)`
20
21 error: call to `core::mem::swap` with a parameter derived from a raw pointer
22   --> $DIR/swap_ptr_to_ref.rs:16:9
23    |
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))`
26
27 error: aborting due to 4 previous errors
28