diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/swap_ptr_to_ref_unfixable.stderr')
-rw-r--r-- | src/tools/clippy/tests/ui/swap_ptr_to_ref_unfixable.stderr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/swap_ptr_to_ref_unfixable.stderr b/src/tools/clippy/tests/ui/swap_ptr_to_ref_unfixable.stderr new file mode 100644 index 000000000..c261205d5 --- /dev/null +++ b/src/tools/clippy/tests/ui/swap_ptr_to_ref_unfixable.stderr @@ -0,0 +1,22 @@ +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 + |