2020-12-31 16:10:13 +00:00
|
|
|
error: redundant slicing of the whole range
|
2021-03-26 02:30:14 +00:00
|
|
|
--> $DIR/redundant_slicing.rs:6:13
|
2020-12-31 16:10:13 +00:00
|
|
|
|
|
2021-03-26 02:30:14 +00:00
|
|
|
LL | let _ = &slice[..];
|
|
|
|
| ^^^^^^^^^^ help: use the original value instead: `slice`
|
2020-12-31 16:10:13 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-slicing` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: redundant slicing of the whole range
|
2021-03-26 02:30:14 +00:00
|
|
|
--> $DIR/redundant_slicing.rs:10:13
|
2020-12-31 16:10:13 +00:00
|
|
|
|
|
2021-03-26 02:30:14 +00:00
|
|
|
LL | let _ = &(&v[..])[..]; // Outer borrow is redundant
|
|
|
|
| ^^^^^^^^^^^^^ help: use the original value instead: `(&v[..])`
|
2020-12-31 16:10:13 +00:00
|
|
|
|
2021-03-26 02:30:14 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
LL | let _ = &mut mut_slice[..]; // Should reborrow instead of slice
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: reborrow the original value instead: `&mut *mut_slice`
|
|
|
|
|
|
|
|
error: redundant slicing of the whole range
|
|
|
|
--> $DIR/redundant_slicing.rs:24:13
|
|
|
|
|
|
|
|
|
LL | let _ = &m!(slice)[..];
|
|
|
|
| ^^^^^^^^^^^^^^ help: use the original value instead: `slice`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2020-12-31 16:10:13 +00:00
|
|
|
|