]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/iter_skip_next.stderr
iterate List by value
[rust.git] / tests / ui / iter_skip_next.stderr
index 6b65c1e4a1e38bf81d168d6a5f4498aa694c7398..5709f3355298bb396337aa7a259dc6040c3d5da4 100644 (file)
@@ -1,28 +1,35 @@
-error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
-  --> $DIR/iter_skip_next.rs:52:13
+error: called `skip(x).next()` on an iterator
+  --> $DIR/iter_skip_next.rs:13:13
    |
 LL |     let _ = some_vec.iter().skip(42).next();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D clippy::iter-skip-next` implied by `-D warnings`
+   = help: this is more succinctly expressed by calling `nth(x)`
 
-error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
-  --> $DIR/iter_skip_next.rs:53:13
+error: called `skip(x).next()` on an iterator
+  --> $DIR/iter_skip_next.rs:14:13
    |
 LL |     let _ = some_vec.iter().cycle().skip(42).next();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: this is more succinctly expressed by calling `nth(x)`
 
-error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
-  --> $DIR/iter_skip_next.rs:54:13
+error: called `skip(x).next()` on an iterator
+  --> $DIR/iter_skip_next.rs:15:13
    |
 LL |     let _ = (1..10).skip(10).next();
    |             ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: this is more succinctly expressed by calling `nth(x)`
 
-error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
-  --> $DIR/iter_skip_next.rs:55:14
+error: called `skip(x).next()` on an iterator
+  --> $DIR/iter_skip_next.rs:16:14
    |
 LL |     let _ = &some_vec[..].iter().skip(3).next();
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: this is more succinctly expressed by calling `nth(x)`
 
 error: aborting due to 4 previous errors