]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/ptr_offset_with_cast.stderr
Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2
[rust.git] / tests / ui / ptr_offset_with_cast.stderr
index b5c7a03e2775e8ff55d60d168eeddcb7da2cb97a..fd45224ca067fa3450bc07cd12f5ebef51052495 100644 (file)
@@ -1,16 +1,16 @@
 error: use of `offset` with a `usize` casted to an `isize`
-  --> $DIR/ptr_offset_with_cast.rs:12:9
+  --> $DIR/ptr_offset_with_cast.rs:12:17
    |
-LL |         ptr.offset(offset_usize as isize);
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.add(offset_usize)`
+LL |         let _ = ptr.offset(offset_usize as isize);
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.add(offset_usize)`
    |
    = note: `-D clippy::ptr-offset-with-cast` implied by `-D warnings`
 
 error: use of `wrapping_offset` with a `usize` casted to an `isize`
-  --> $DIR/ptr_offset_with_cast.rs:16:9
+  --> $DIR/ptr_offset_with_cast.rs:16:17
    |
-LL |         ptr.wrapping_offset(offset_usize as isize);
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.wrapping_add(offset_usize)`
+LL |         let _ = ptr.wrapping_offset(offset_usize as isize);
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.wrapping_add(offset_usize)`
 
 error: aborting due to 2 previous errors