]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/redundant_slicing.stderr
`assertions_on_result_states` fix suggestion when `assert!` not in a statement
[rust.git] / tests / ui / redundant_slicing.stderr
index bbd10eafbbe7807e3e9b8f8e96fc8ada4936b999..82367143c07fa40f395768d038a734e0bfeaa619 100644 (file)
@@ -1,34 +1,22 @@
 error: redundant slicing of the whole range
-  --> $DIR/redundant_slicing.rs:6:13
+  --> $DIR/redundant_slicing.rs:10:13
    |
-LL |     let _ = &slice[..];
+LL |     let _ = &slice[..]; // Redundant slice
    |             ^^^^^^^^^^ help: use the original value instead: `slice`
    |
    = note: `-D clippy::redundant-slicing` implied by `-D warnings`
 
 error: redundant slicing of the whole range
-  --> $DIR/redundant_slicing.rs:10:13
-   |
-LL |     let _ = &(&v[..])[..]; // Outer borrow is redundant
-   |             ^^^^^^^^^^^^^ help: use the original value instead: `(&v[..])`
-
-error: redundant slicing of the whole range
-  --> $DIR/redundant_slicing.rs:13:20
-   |
-LL |     let err = &mut &S[..]; // Should reborrow instead of slice
-   |                    ^^^^^^ help: reborrow the original value instead: `&*S`
-
-error: redundant slicing of the whole range
-  --> $DIR/redundant_slicing.rs:17:13
+  --> $DIR/redundant_slicing.rs:14:13
    |
-LL |     let _ = &mut mut_slice[..]; // Should reborrow instead of slice
-   |             ^^^^^^^^^^^^^^^^^^ help: reborrow the original value instead: `&mut *mut_slice`
+LL |     let _ = &(&*v)[..]; // Outer borrow is redundant
+   |             ^^^^^^^^^^ help: use the original value instead: `(&*v)`
 
 error: redundant slicing of the whole range
-  --> $DIR/redundant_slicing.rs:24:13
+  --> $DIR/redundant_slicing.rs:31:13
    |
 LL |     let _ = &m!(slice)[..];
    |             ^^^^^^^^^^^^^^ help: use the original value instead: `slice`
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors