]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/iter_next_slice.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / iter_next_slice.stderr
diff --git a/src/tools/clippy/tests/ui/iter_next_slice.stderr b/src/tools/clippy/tests/ui/iter_next_slice.stderr
new file mode 100644 (file)
index 0000000..8c10a25
--- /dev/null
@@ -0,0 +1,28 @@
+error: using `.iter().next()` on an array
+  --> $DIR/iter_next_slice.rs:9:5
+   |
+LL |     s.iter().next();
+   |     ^^^^^^^^^^^^^^^ help: try calling: `s.get(0)`
+   |
+   = note: `-D clippy::iter-next-slice` implied by `-D warnings`
+
+error: using `.iter().next()` on a Slice without end index
+  --> $DIR/iter_next_slice.rs:12:5
+   |
+LL |     s[2..].iter().next();
+   |     ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)`
+
+error: using `.iter().next()` on a Slice without end index
+  --> $DIR/iter_next_slice.rs:15:5
+   |
+LL |     v[5..].iter().next();
+   |     ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)`
+
+error: using `.iter().next()` on an array
+  --> $DIR/iter_next_slice.rs:18:5
+   |
+LL |     v.iter().next();
+   |     ^^^^^^^^^^^^^^^ help: try calling: `v.get(0)`
+
+error: aborting due to 4 previous errors
+