|
1 | 1 | error: this `.skip()` call skips more items than the iterator will produce |
2 | | - --> $DIR/iter_out_of_bounds.rs:8:14 |
| 2 | + --> $DIR/iter_out_of_bounds.rs:11:14 |
3 | 3 | | |
4 | 4 | LL | for _ in [1, 2, 3].iter().skip(4) { |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
6 | 6 | | |
7 | 7 | = note: this operation is useless and will create an empty iterator |
8 | 8 | note: the lint level is defined here |
9 | | - --> $DIR/iter_out_of_bounds.rs:1:9 |
| 9 | + --> $DIR/iter_out_of_bounds.rs:3:9 |
10 | 10 | | |
11 | 11 | LL | #![deny(clippy::iter_out_of_bounds)] |
12 | 12 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
13 | 13 |
|
14 | 14 | error: this `.take()` call takes more items than the iterator will produce |
15 | | - --> $DIR/iter_out_of_bounds.rs:12:19 |
| 15 | + --> $DIR/iter_out_of_bounds.rs:15:19 |
16 | 16 | | |
17 | 17 | LL | for (i, _) in [1, 2, 3].iter().take(4).enumerate() { |
18 | 18 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
19 | 19 | | |
20 | 20 | = note: this operation is useless and the returned iterator will simply yield the same items |
21 | 21 |
|
22 | 22 | error: this `.take()` call takes more items than the iterator will produce |
23 | | - --> $DIR/iter_out_of_bounds.rs:18:14 |
| 23 | + --> $DIR/iter_out_of_bounds.rs:21:14 |
24 | 24 | | |
25 | 25 | LL | for _ in (&&&&&&[1, 2, 3]).iter().take(4) {} |
26 | 26 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
27 | 27 | | |
28 | 28 | = note: this operation is useless and the returned iterator will simply yield the same items |
29 | 29 |
|
30 | 30 | error: this `.skip()` call skips more items than the iterator will produce |
31 | | - --> $DIR/iter_out_of_bounds.rs:21:14 |
| 31 | + --> $DIR/iter_out_of_bounds.rs:24:14 |
32 | 32 | | |
33 | 33 | LL | for _ in [1, 2, 3].iter().skip(4) {} |
34 | 34 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
35 | 35 | | |
36 | 36 | = note: this operation is useless and will create an empty iterator |
37 | 37 |
|
| 38 | +error: this `.skip()` call skips more items than the iterator will produce |
| 39 | + --> $DIR/iter_out_of_bounds.rs:27:14 |
| 40 | + | |
| 41 | +LL | for _ in [1; 3].iter().skip(4) {} |
| 42 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 43 | + | |
| 44 | + = note: this operation is useless and will create an empty iterator |
| 45 | + |
38 | 46 | error: this `.skip()` call skips more items than the iterator will produce |
39 | 47 | --> $DIR/iter_out_of_bounds.rs:33:14 |
40 | 48 | | |
| 49 | +LL | for _ in vec![1, 2, 3].iter().skip(4) {} |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | + | |
| 52 | + = note: this operation is useless and will create an empty iterator |
| 53 | + |
| 54 | +error: this `.skip()` call skips more items than the iterator will produce |
| 55 | + --> $DIR/iter_out_of_bounds.rs:36:14 |
| 56 | + | |
| 57 | +LL | for _ in vec![1; 3].iter().skip(4) {} |
| 58 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 59 | + | |
| 60 | + = note: this operation is useless and will create an empty iterator |
| 61 | + |
| 62 | +error: this `.skip()` call skips more items than the iterator will produce |
| 63 | + --> $DIR/iter_out_of_bounds.rs:40:14 |
| 64 | + | |
| 65 | +LL | for _ in x.iter().skip(4) {} |
| 66 | + | ^^^^^^^^^^^^^^^^ |
| 67 | + | |
| 68 | + = note: this operation is useless and will create an empty iterator |
| 69 | + |
| 70 | +error: this `.skip()` call skips more items than the iterator will produce |
| 71 | + --> $DIR/iter_out_of_bounds.rs:44:14 |
| 72 | + | |
| 73 | +LL | for _ in x.iter().skip(n) {} |
| 74 | + | ^^^^^^^^^^^^^^^^ |
| 75 | + | |
| 76 | + = note: this operation is useless and will create an empty iterator |
| 77 | + |
| 78 | +error: this `.skip()` call skips more items than the iterator will produce |
| 79 | + --> $DIR/iter_out_of_bounds.rs:49:14 |
| 80 | + | |
41 | 81 | LL | for _ in empty().skip(1) {} |
42 | 82 | | ^^^^^^^^^^^^^^^ |
43 | 83 | | |
44 | 84 | = note: this operation is useless and will create an empty iterator |
45 | 85 |
|
46 | 86 | error: this `.take()` call takes more items than the iterator will produce |
47 | | - --> $DIR/iter_out_of_bounds.rs:36:14 |
| 87 | + --> $DIR/iter_out_of_bounds.rs:52:14 |
48 | 88 | | |
49 | 89 | LL | for _ in empty().take(1) {} |
50 | 90 | | ^^^^^^^^^^^^^^^ |
51 | 91 | | |
52 | 92 | = note: this operation is useless and the returned iterator will simply yield the same items |
53 | 93 |
|
54 | 94 | error: this `.skip()` call skips more items than the iterator will produce |
55 | | - --> $DIR/iter_out_of_bounds.rs:39:14 |
| 95 | + --> $DIR/iter_out_of_bounds.rs:55:14 |
56 | 96 | | |
57 | 97 | LL | for _ in std::iter::once(1).skip(2) {} |
58 | 98 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
59 | 99 | | |
60 | 100 | = note: this operation is useless and will create an empty iterator |
61 | 101 |
|
62 | 102 | error: this `.take()` call takes more items than the iterator will produce |
63 | | - --> $DIR/iter_out_of_bounds.rs:42:14 |
| 103 | + --> $DIR/iter_out_of_bounds.rs:58:14 |
64 | 104 | | |
65 | 105 | LL | for _ in std::iter::once(1).take(2) {} |
66 | 106 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
67 | 107 | | |
68 | 108 | = note: this operation is useless and the returned iterator will simply yield the same items |
69 | 109 |
|
70 | | -error: aborting due to 8 previous errors |
| 110 | +error: aborting due to 13 previous errors |
71 | 111 |
|
0 commit comments