summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_slicing.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/redundant_slicing.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/redundant_slicing.stderr b/src/tools/clippy/tests/ui/redundant_slicing.stderr
new file mode 100644
index 000000000..82367143c
--- /dev/null
+++ b/src/tools/clippy/tests/ui/redundant_slicing.stderr
@@ -0,0 +1,22 @@
+error: redundant slicing of the whole range
+ --> $DIR/redundant_slicing.rs:10:13
+ |
+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:14: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:31:13
+ |
+LL | let _ = &m!(slice)[..];
+ | ^^^^^^^^^^^^^^ help: use the original value instead: `slice`
+
+error: aborting due to 3 previous errors
+