11error: this `.skip()` call skips more items than the iterator will produce
2- --> $DIR/iter_out_of_bounds.rs:11 :14
2+ --> $DIR/iter_out_of_bounds.rs:12 :14
33 |
44LL | for _ in [1, 2, 3].iter().skip(4) {
55 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,103 +12,103 @@ LL | #![deny(clippy::iter_out_of_bounds)]
1212 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
1414error: this `.take()` call takes more items than the iterator will produce
15- --> $DIR/iter_out_of_bounds.rs:15 :19
15+ --> $DIR/iter_out_of_bounds.rs:16 :19
1616 |
1717LL | for (i, _) in [1, 2, 3].iter().take(4).enumerate() {
1818 | ^^^^^^^^^^^^^^^^^^^^^^^^
1919 |
2020 = note: this operation is useless and the returned iterator will simply yield the same items
2121
2222error: this `.take()` call takes more items than the iterator will produce
23- --> $DIR/iter_out_of_bounds.rs:21 :14
23+ --> $DIR/iter_out_of_bounds.rs:22 :14
2424 |
2525LL | for _ in (&&&&&&[1, 2, 3]).iter().take(4) {}
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2727 |
2828 = note: this operation is useless and the returned iterator will simply yield the same items
2929
3030error: this `.skip()` call skips more items than the iterator will produce
31- --> $DIR/iter_out_of_bounds.rs:24 :14
31+ --> $DIR/iter_out_of_bounds.rs:25 :14
3232 |
3333LL | for _ in [1, 2, 3].iter().skip(4) {}
3434 | ^^^^^^^^^^^^^^^^^^^^^^^^
3535 |
3636 = note: this operation is useless and will create an empty iterator
3737
3838error: this `.skip()` call skips more items than the iterator will produce
39- --> $DIR/iter_out_of_bounds.rs:27 :14
39+ --> $DIR/iter_out_of_bounds.rs:28 :14
4040 |
4141LL | for _ in [1; 3].iter().skip(4) {}
4242 | ^^^^^^^^^^^^^^^^^^^^^
4343 |
4444 = note: this operation is useless and will create an empty iterator
4545
4646error: this `.skip()` call skips more items than the iterator will produce
47- --> $DIR/iter_out_of_bounds.rs:33 :14
47+ --> $DIR/iter_out_of_bounds.rs:34 :14
4848 |
4949LL | for _ in vec![1, 2, 3].iter().skip(4) {}
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151 |
5252 = note: this operation is useless and will create an empty iterator
5353
5454error: this `.skip()` call skips more items than the iterator will produce
55- --> $DIR/iter_out_of_bounds.rs:36 :14
55+ --> $DIR/iter_out_of_bounds.rs:37 :14
5656 |
5757LL | for _ in vec![1; 3].iter().skip(4) {}
5858 | ^^^^^^^^^^^^^^^^^^^^^^^^^
5959 |
6060 = note: this operation is useless and will create an empty iterator
6161
6262error: this `.skip()` call skips more items than the iterator will produce
63- --> $DIR/iter_out_of_bounds.rs:40 :14
63+ --> $DIR/iter_out_of_bounds.rs:41 :14
6464 |
6565LL | for _ in x.iter().skip(4) {}
6666 | ^^^^^^^^^^^^^^^^
6767 |
6868 = note: this operation is useless and will create an empty iterator
6969
7070error: this `.skip()` call skips more items than the iterator will produce
71- --> $DIR/iter_out_of_bounds.rs:44 :14
71+ --> $DIR/iter_out_of_bounds.rs:45 :14
7272 |
7373LL | for _ in x.iter().skip(n) {}
7474 | ^^^^^^^^^^^^^^^^
7575 |
7676 = note: this operation is useless and will create an empty iterator
7777
7878error: this `.skip()` call skips more items than the iterator will produce
79- --> $DIR/iter_out_of_bounds.rs:49 :14
79+ --> $DIR/iter_out_of_bounds.rs:50 :14
8080 |
8181LL | for _ in empty().skip(1) {}
8282 | ^^^^^^^^^^^^^^^
8383 |
8484 = note: this operation is useless and will create an empty iterator
8585
8686error: this `.take()` call takes more items than the iterator will produce
87- --> $DIR/iter_out_of_bounds.rs:52 :14
87+ --> $DIR/iter_out_of_bounds.rs:53 :14
8888 |
8989LL | for _ in empty().take(1) {}
9090 | ^^^^^^^^^^^^^^^
9191 |
9292 = note: this operation is useless and the returned iterator will simply yield the same items
9393
9494error: this `.skip()` call skips more items than the iterator will produce
95- --> $DIR/iter_out_of_bounds.rs:55 :14
95+ --> $DIR/iter_out_of_bounds.rs:56 :14
9696 |
9797LL | for _ in std::iter::once(1).skip(2) {}
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
9999 |
100100 = note: this operation is useless and will create an empty iterator
101101
102102error: this `.take()` call takes more items than the iterator will produce
103- --> $DIR/iter_out_of_bounds.rs:58 :14
103+ --> $DIR/iter_out_of_bounds.rs:59 :14
104104 |
105105LL | for _ in std::iter::once(1).take(2) {}
106106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
107107 |
108108 = note: this operation is useless and the returned iterator will simply yield the same items
109109
110110error: this `.take()` call takes more items than the iterator will produce
111- --> $DIR/iter_out_of_bounds.rs:61 :14
111+ --> $DIR/iter_out_of_bounds.rs:62 :14
112112 |
113113LL | for x in [].iter().take(1) {
114114 | ^^^^^^^^^^^^^^^^^
0 commit comments