Skip to content

Commit 082cfa7

Browse files
phanschManishearth
authored andcommitted
[Backported] Rustup to rust-lang/rust#59545
1 parent 60a609a commit 082cfa7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/ui/for_loop.stderr

+13-13
Original file line numberDiff line numberDiff line change
@@ -66,83 +66,83 @@ error: it is more concise to loop over references to containers instead of using
6666
--> $DIR/for_loop.rs:107:15
6767
|
6868
LL | for _v in vec.iter() {}
69-
| ^^^^^^^^^^
69+
| ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
7070
|
7171
= note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
7272

7373
error: it is more concise to loop over references to containers instead of using explicit iteration methods
7474
--> $DIR/for_loop.rs:109:15
7575
|
7676
LL | for _v in vec.iter_mut() {}
77-
| ^^^^^^^^^^^^^^
77+
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
7878

7979
error: it is more concise to loop over containers instead of using explicit iteration methods`
8080
--> $DIR/for_loop.rs:112:15
8181
|
8282
LL | for _v in out_vec.into_iter() {}
83-
| ^^^^^^^^^^^^^^^^^^^
83+
| ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
8484
|
8585
= note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
8686

8787
error: it is more concise to loop over references to containers instead of using explicit iteration methods
8888
--> $DIR/for_loop.rs:115:15
8989
|
9090
LL | for _v in array.into_iter() {}
91-
| ^^^^^^^^^^^^^^^^^
91+
| ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&array`
9292

9393
error: it is more concise to loop over references to containers instead of using explicit iteration methods
9494
--> $DIR/for_loop.rs:120:15
9595
|
9696
LL | for _v in [1, 2, 3].iter() {}
97-
| ^^^^^^^^^^^^^^^^
97+
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
9898

9999
error: it is more concise to loop over references to containers instead of using explicit iteration methods
100100
--> $DIR/for_loop.rs:124:15
101101
|
102102
LL | for _v in [0; 32].iter() {}
103-
| ^^^^^^^^^^^^^^
103+
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
104104

105105
error: it is more concise to loop over references to containers instead of using explicit iteration methods
106106
--> $DIR/for_loop.rs:129:15
107107
|
108108
LL | for _v in ll.iter() {}
109-
| ^^^^^^^^^
109+
| ^^^^^^^^^ help: to write this more concisely, try: `&ll`
110110

111111
error: it is more concise to loop over references to containers instead of using explicit iteration methods
112112
--> $DIR/for_loop.rs:132:15
113113
|
114114
LL | for _v in vd.iter() {}
115-
| ^^^^^^^^^
115+
| ^^^^^^^^^ help: to write this more concisely, try: `&vd`
116116

117117
error: it is more concise to loop over references to containers instead of using explicit iteration methods
118118
--> $DIR/for_loop.rs:135:15
119119
|
120120
LL | for _v in bh.iter() {}
121-
| ^^^^^^^^^
121+
| ^^^^^^^^^ help: to write this more concisely, try: `&bh`
122122

123123
error: it is more concise to loop over references to containers instead of using explicit iteration methods
124124
--> $DIR/for_loop.rs:138:15
125125
|
126126
LL | for _v in hm.iter() {}
127-
| ^^^^^^^^^
127+
| ^^^^^^^^^ help: to write this more concisely, try: `&hm`
128128

129129
error: it is more concise to loop over references to containers instead of using explicit iteration methods
130130
--> $DIR/for_loop.rs:141:15
131131
|
132132
LL | for _v in bt.iter() {}
133-
| ^^^^^^^^^
133+
| ^^^^^^^^^ help: to write this more concisely, try: `&bt`
134134

135135
error: it is more concise to loop over references to containers instead of using explicit iteration methods
136136
--> $DIR/for_loop.rs:144:15
137137
|
138138
LL | for _v in hs.iter() {}
139-
| ^^^^^^^^^
139+
| ^^^^^^^^^ help: to write this more concisely, try: `&hs`
140140

141141
error: it is more concise to loop over references to containers instead of using explicit iteration methods
142142
--> $DIR/for_loop.rs:147:15
143143
|
144144
LL | for _v in bs.iter() {}
145-
| ^^^^^^^^^
145+
| ^^^^^^^^^ help: to write this more concisely, try: `&bs`
146146

147147
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
148148
--> $DIR/for_loop.rs:149:15

0 commit comments

Comments
 (0)