11error: this range is empty so this for loop will never run
2- --> $DIR/for_loop.rs:40 :14
2+ --> $DIR/for_loop.rs:39 :14
33 |
44LL | for i in 10..0 {
55 | ^^^^^
@@ -11,7 +11,7 @@ LL | for i in (0..10).rev() {
1111 | ^^^^^^^^^^^^^
1212
1313error: this range is empty so this for loop will never run
14- --> $DIR/for_loop.rs:44 :14
14+ --> $DIR/for_loop.rs:43 :14
1515 |
1616LL | for i in 10..=0 {
1717 | ^^^^^^
@@ -21,7 +21,7 @@ LL | for i in (0...10).rev() {
2121 | ^^^^^^^^^^^^^^
2222
2323error: this range is empty so this for loop will never run
24- --> $DIR/for_loop.rs:48 :14
24+ --> $DIR/for_loop.rs:47 :14
2525 |
2626LL | for i in MAX_LEN..0 {
2727 | ^^^^^^^^^^
@@ -31,13 +31,13 @@ LL | for i in (0..MAX_LEN).rev() {
3131 | ^^^^^^^^^^^^^^^^^^
3232
3333error: this range is empty so this for loop will never run
34- --> $DIR/for_loop.rs:52 :14
34+ --> $DIR/for_loop.rs:51 :14
3535 |
3636LL | for i in 5..5 {
3737 | ^^^^
3838
3939error: this range is empty so this for loop will never run
40- --> $DIR/for_loop.rs:77 :14
40+ --> $DIR/for_loop.rs:76 :14
4141 |
4242LL | for i in 10..5 + 4 {
4343 | ^^^^^^^^^
@@ -47,7 +47,7 @@ LL | for i in (5 + 4..10).rev() {
4747 | ^^^^^^^^^^^^^^^^^
4848
4949error: this range is empty so this for loop will never run
50- --> $DIR/for_loop.rs:81 :14
50+ --> $DIR/for_loop.rs:80 :14
5151 |
5252LL | for i in (5 + 2)..(3 - 1) {
5353 | ^^^^^^^^^^^^^^^^
@@ -57,108 +57,100 @@ LL | for i in ((3 - 1)..(5 + 2)).rev() {
5757 | ^^^^^^^^^^^^^^^^^^^^^^^^
5858
5959error: this range is empty so this for loop will never run
60- --> $DIR/for_loop.rs:85 :14
60+ --> $DIR/for_loop.rs:84 :14
6161 |
6262LL | for i in (5 + 2)..(8 - 1) {
6363 | ^^^^^^^^^^^^^^^^
6464
6565error: it is more concise to loop over references to containers instead of using explicit iteration methods
66- --> $DIR/for_loop.rs:107 :15
66+ --> $DIR/for_loop.rs:106 :15
6767 |
6868LL | for _v in vec.iter() {}
6969 | ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
7070 |
7171 = note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
7272
7373error: it is more concise to loop over references to containers instead of using explicit iteration methods
74- --> $DIR/for_loop.rs:109 :15
74+ --> $DIR/for_loop.rs:108 :15
7575 |
7676LL | for _v in vec.iter_mut() {}
7777 | ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
7878
7979error: it is more concise to loop over containers instead of using explicit iteration methods`
80- --> $DIR/for_loop.rs:112 :15
80+ --> $DIR/for_loop.rs:111 :15
8181 |
8282LL | for _v in out_vec.into_iter() {}
8383 | ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
8484 |
8585 = note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
8686
8787error: it is more concise to loop over references to containers instead of using explicit iteration methods
88- --> $DIR/for_loop.rs:115 :15
88+ --> $DIR/for_loop.rs:114 :15
8989 |
9090LL | for _v in array.into_iter() {}
9191 | ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&array`
9292
9393error: it is more concise to loop over references to containers instead of using explicit iteration methods
94- --> $DIR/for_loop.rs:120 :15
94+ --> $DIR/for_loop.rs:119 :15
9595 |
9696LL | for _v in [1, 2, 3].iter() {}
9797 | ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
9898
9999error: it is more concise to loop over references to containers instead of using explicit iteration methods
100- --> $DIR/for_loop.rs:124 :15
100+ --> $DIR/for_loop.rs:123 :15
101101 |
102102LL | for _v in [0; 32].iter() {}
103103 | ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
104104
105105error: it is more concise to loop over references to containers instead of using explicit iteration methods
106- --> $DIR/for_loop.rs:129 :15
106+ --> $DIR/for_loop.rs:128 :15
107107 |
108108LL | for _v in ll.iter() {}
109109 | ^^^^^^^^^ help: to write this more concisely, try: `&ll`
110110
111111error: it is more concise to loop over references to containers instead of using explicit iteration methods
112- --> $DIR/for_loop.rs:132 :15
112+ --> $DIR/for_loop.rs:131 :15
113113 |
114114LL | for _v in vd.iter() {}
115115 | ^^^^^^^^^ help: to write this more concisely, try: `&vd`
116116
117117error: it is more concise to loop over references to containers instead of using explicit iteration methods
118- --> $DIR/for_loop.rs:135 :15
118+ --> $DIR/for_loop.rs:134 :15
119119 |
120120LL | for _v in bh.iter() {}
121121 | ^^^^^^^^^ help: to write this more concisely, try: `&bh`
122122
123123error: it is more concise to loop over references to containers instead of using explicit iteration methods
124- --> $DIR/for_loop.rs:138 :15
124+ --> $DIR/for_loop.rs:137 :15
125125 |
126126LL | for _v in hm.iter() {}
127127 | ^^^^^^^^^ help: to write this more concisely, try: `&hm`
128128
129129error: it is more concise to loop over references to containers instead of using explicit iteration methods
130- --> $DIR/for_loop.rs:141 :15
130+ --> $DIR/for_loop.rs:140 :15
131131 |
132132LL | for _v in bt.iter() {}
133133 | ^^^^^^^^^ help: to write this more concisely, try: `&bt`
134134
135135error: it is more concise to loop over references to containers instead of using explicit iteration methods
136- --> $DIR/for_loop.rs:144 :15
136+ --> $DIR/for_loop.rs:143 :15
137137 |
138138LL | for _v in hs.iter() {}
139139 | ^^^^^^^^^ help: to write this more concisely, try: `&hs`
140140
141141error: it is more concise to loop over references to containers instead of using explicit iteration methods
142- --> $DIR/for_loop.rs:147 :15
142+ --> $DIR/for_loop.rs:146 :15
143143 |
144144LL | for _v in bs.iter() {}
145145 | ^^^^^^^^^ help: to write this more concisely, try: `&bs`
146146
147147error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
148- --> $DIR/for_loop.rs:149 :15
148+ --> $DIR/for_loop.rs:148 :15
149149 |
150150LL | for _v in vec.iter().next() {}
151151 | ^^^^^^^^^^^^^^^^^
152152 |
153153 = note: `-D clippy::iter-next-loop` implied by `-D warnings`
154154
155- error: you are collect()ing an iterator and throwing away the result. Consider using an explicit for loop to exhaust the iterator
156- --> $DIR/for_loop.rs:156:5
157- |
158- LL | vec.iter().cloned().map(|x| out.push(x)).collect::<Vec<_>>();
159- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160- |
161- = note: `-D clippy::unused-collect` implied by `-D warnings`
162-
163- error: aborting due to 22 previous errors
155+ error: aborting due to 21 previous errors
164156
0 commit comments