1
1
error: this range is empty so this for loop will never run
2
- --> $DIR/for_loop_fixable.rs:39 :14
2
+ --> $DIR/for_loop_fixable.rs:38 :14
3
3
|
4
4
LL | for i in 10..0 {
5
5
| ^^^^^
@@ -11,7 +11,7 @@ LL | for i in (0..10).rev() {
11
11
| ^^^^^^^^^^^^^
12
12
13
13
error: this range is empty so this for loop will never run
14
- --> $DIR/for_loop_fixable.rs:43 :14
14
+ --> $DIR/for_loop_fixable.rs:42 :14
15
15
|
16
16
LL | for i in 10..=0 {
17
17
| ^^^^^^
@@ -22,7 +22,7 @@ LL | for i in (0..=10).rev() {
22
22
| ^^^^^^^^^^^^^^
23
23
24
24
error: this range is empty so this for loop will never run
25
- --> $DIR/for_loop_fixable.rs:47 :14
25
+ --> $DIR/for_loop_fixable.rs:46 :14
26
26
|
27
27
LL | for i in MAX_LEN..0 {
28
28
| ^^^^^^^^^^
@@ -33,7 +33,7 @@ LL | for i in (0..MAX_LEN).rev() {
33
33
| ^^^^^^^^^^^^^^^^^^
34
34
35
35
error: this range is empty so this for loop will never run
36
- --> $DIR/for_loop_fixable.rs:72 :14
36
+ --> $DIR/for_loop_fixable.rs:71 :14
37
37
|
38
38
LL | for i in 10..5 + 4 {
39
39
| ^^^^^^^^^
@@ -44,7 +44,7 @@ LL | for i in (5 + 4..10).rev() {
44
44
| ^^^^^^^^^^^^^^^^^
45
45
46
46
error: this range is empty so this for loop will never run
47
- --> $DIR/for_loop_fixable.rs:76 :14
47
+ --> $DIR/for_loop_fixable.rs:75 :14
48
48
|
49
49
LL | for i in (5 + 2)..(3 - 1) {
50
50
| ^^^^^^^^^^^^^^^^
@@ -55,95 +55,95 @@ LL | for i in ((3 - 1)..(5 + 2)).rev() {
55
55
| ^^^^^^^^^^^^^^^^^^^^^^^^
56
56
57
57
error: it is more concise to loop over references to containers instead of using explicit iteration methods
58
- --> $DIR/for_loop_fixable.rs:98 :15
58
+ --> $DIR/for_loop_fixable.rs:97 :15
59
59
|
60
60
LL | for _v in vec.iter() {}
61
61
| ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
62
62
|
63
63
= note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
64
64
65
65
error: it is more concise to loop over references to containers instead of using explicit iteration methods
66
- --> $DIR/for_loop_fixable.rs:100 :15
66
+ --> $DIR/for_loop_fixable.rs:99 :15
67
67
|
68
68
LL | for _v in vec.iter_mut() {}
69
69
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
70
70
71
71
error: it is more concise to loop over containers instead of using explicit iteration methods
72
- --> $DIR/for_loop_fixable.rs:103 :15
72
+ --> $DIR/for_loop_fixable.rs:102 :15
73
73
|
74
74
LL | for _v in out_vec.into_iter() {}
75
75
| ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
76
76
|
77
77
= note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
78
78
79
79
error: it is more concise to loop over references to containers instead of using explicit iteration methods
80
- --> $DIR/for_loop_fixable.rs:108 :15
80
+ --> $DIR/for_loop_fixable.rs:107 :15
81
81
|
82
82
LL | for _v in [1, 2, 3].iter() {}
83
83
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
84
84
85
85
error: it is more concise to loop over references to containers instead of using explicit iteration methods
86
- --> $DIR/for_loop_fixable.rs:112 :15
86
+ --> $DIR/for_loop_fixable.rs:111 :15
87
87
|
88
88
LL | for _v in [0; 32].iter() {}
89
89
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
90
90
91
91
error: it is more concise to loop over references to containers instead of using explicit iteration methods
92
- --> $DIR/for_loop_fixable.rs:117 :15
92
+ --> $DIR/for_loop_fixable.rs:116 :15
93
93
|
94
94
LL | for _v in ll.iter() {}
95
95
| ^^^^^^^^^ help: to write this more concisely, try: `&ll`
96
96
97
97
error: it is more concise to loop over references to containers instead of using explicit iteration methods
98
- --> $DIR/for_loop_fixable.rs:120 :15
98
+ --> $DIR/for_loop_fixable.rs:119 :15
99
99
|
100
100
LL | for _v in vd.iter() {}
101
101
| ^^^^^^^^^ help: to write this more concisely, try: `&vd`
102
102
103
103
error: it is more concise to loop over references to containers instead of using explicit iteration methods
104
- --> $DIR/for_loop_fixable.rs:123 :15
104
+ --> $DIR/for_loop_fixable.rs:122 :15
105
105
|
106
106
LL | for _v in bh.iter() {}
107
107
| ^^^^^^^^^ help: to write this more concisely, try: `&bh`
108
108
109
109
error: it is more concise to loop over references to containers instead of using explicit iteration methods
110
- --> $DIR/for_loop_fixable.rs:126 :15
110
+ --> $DIR/for_loop_fixable.rs:125 :15
111
111
|
112
112
LL | for _v in hm.iter() {}
113
113
| ^^^^^^^^^ help: to write this more concisely, try: `&hm`
114
114
115
115
error: it is more concise to loop over references to containers instead of using explicit iteration methods
116
- --> $DIR/for_loop_fixable.rs:129 :15
116
+ --> $DIR/for_loop_fixable.rs:128 :15
117
117
|
118
118
LL | for _v in bt.iter() {}
119
119
| ^^^^^^^^^ help: to write this more concisely, try: `&bt`
120
120
121
121
error: it is more concise to loop over references to containers instead of using explicit iteration methods
122
- --> $DIR/for_loop_fixable.rs:132 :15
122
+ --> $DIR/for_loop_fixable.rs:131 :15
123
123
|
124
124
LL | for _v in hs.iter() {}
125
125
| ^^^^^^^^^ help: to write this more concisely, try: `&hs`
126
126
127
127
error: it is more concise to loop over references to containers instead of using explicit iteration methods
128
- --> $DIR/for_loop_fixable.rs:135 :15
128
+ --> $DIR/for_loop_fixable.rs:134 :15
129
129
|
130
130
LL | for _v in bs.iter() {}
131
131
| ^^^^^^^^^ help: to write this more concisely, try: `&bs`
132
132
133
133
error: it is more concise to loop over containers instead of using explicit iteration methods
134
- --> $DIR/for_loop_fixable.rs:310 :18
134
+ --> $DIR/for_loop_fixable.rs:309 :18
135
135
|
136
136
LL | for i in iterator.into_iter() {
137
137
| ^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `iterator`
138
138
139
139
error: it is more concise to loop over references to containers instead of using explicit iteration methods
140
- --> $DIR/for_loop_fixable.rs:330 :18
140
+ --> $DIR/for_loop_fixable.rs:329 :18
141
141
|
142
142
LL | for _ in t.into_iter() {}
143
143
| ^^^^^^^^^^^^^ help: to write this more concisely, try: `&t`
144
144
145
145
error: it is more concise to loop over containers instead of using explicit iteration methods
146
- --> $DIR/for_loop_fixable.rs:332 :18
146
+ --> $DIR/for_loop_fixable.rs:331 :18
147
147
|
148
148
LL | for _ in r.into_iter() {}
149
149
| ^^^^^^^^^^^^^ help: to write this more concisely, try: `r`
0 commit comments