@@ -122,7 +122,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
122122 --> tests/ui/useless_conversion.rs:189:7
123123 |
124124LL | b(vec![1, 2].into_iter());
125- | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
125+ | ^^^^^^^^^^------------
126+ | |
127+ | help: consider removing the `.into_iter()`
126128 |
127129note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
128130 --> tests/ui/useless_conversion.rs:179:13
@@ -134,7 +136,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
134136 --> tests/ui/useless_conversion.rs:190:7
135137 |
136138LL | c(vec![1, 2].into_iter());
137- | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
139+ | ^^^^^^^^^^------------
140+ | |
141+ | help: consider removing the `.into_iter()`
138142 |
139143note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
140144 --> tests/ui/useless_conversion.rs:180:18
@@ -146,7 +150,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
146150 --> tests/ui/useless_conversion.rs:191:7
147151 |
148152LL | d(vec![1, 2].into_iter());
149- | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
153+ | ^^^^^^^^^^------------
154+ | |
155+ | help: consider removing the `.into_iter()`
150156 |
151157note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
152158 --> tests/ui/useless_conversion.rs:183:12
@@ -158,7 +164,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
158164 --> tests/ui/useless_conversion.rs:194:7
159165 |
160166LL | b(vec![1, 2].into_iter().into_iter());
161- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`s: `vec![1, 2]`
167+ | ^^^^^^^^^^------------------------
168+ | |
169+ | help: consider removing the `.into_iter()`s
162170 |
163171note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
164172 --> tests/ui/useless_conversion.rs:179:13
@@ -170,7 +178,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
170178 --> tests/ui/useless_conversion.rs:195:7
171179 |
172180LL | b(vec![1, 2].into_iter().into_iter().into_iter());
173- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`s: `vec![1, 2]`
181+ | ^^^^^^^^^^------------------------------------
182+ | |
183+ | help: consider removing the `.into_iter()`s
174184 |
175185note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
176186 --> tests/ui/useless_conversion.rs:179:13
@@ -182,7 +192,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
182192 --> tests/ui/useless_conversion.rs:241:24
183193 |
184194LL | foo2::<i32, _>([1, 2, 3].into_iter());
185- | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2, 3]`
195+ | ^^^^^^^^^------------
196+ | |
197+ | help: consider removing the `.into_iter()`
186198 |
187199note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
188200 --> tests/ui/useless_conversion.rs:220:12
@@ -194,7 +206,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
194206 --> tests/ui/useless_conversion.rs:249:14
195207 |
196208LL | foo3([1, 2, 3].into_iter());
197- | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2, 3]`
209+ | ^^^^^^^^^------------
210+ | |
211+ | help: consider removing the `.into_iter()`
198212 |
199213note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
200214 --> tests/ui/useless_conversion.rs:229:12
@@ -206,7 +220,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
206220 --> tests/ui/useless_conversion.rs:258:16
207221 |
208222LL | S1.foo([1, 2].into_iter());
209- | ^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2]`
223+ | ^^^^^^------------
224+ | |
225+ | help: consider removing the `.into_iter()`
210226 |
211227note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
212228 --> tests/ui/useless_conversion.rs:255:27
@@ -218,7 +234,9 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
218234 --> tests/ui/useless_conversion.rs:277:44
219235 |
220236LL | v0.into_iter().interleave_shortest(v1.into_iter());
221- | ^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v1`
237+ | ^^------------
238+ | |
239+ | help: consider removing the `.into_iter()`
222240 |
223241note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
224242 --> tests/ui/useless_conversion.rs:264:20
@@ -278,25 +296,35 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
278296 --> tests/ui/useless_conversion.rs:356:32
279297 |
280298LL | let _ = iter.chain(self.my_field.into_iter());
281- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `&self.my_field`
299+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
282300 |
283301note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
284302 --> /home/sam/.rustup/toolchains/nightly-2025-01-09-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:471:12
285303 |
286304LL | U: IntoIterator<Item = Self::Item>,
287305 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
306+ help: consider removing the `.into_iter()`
307+ |
308+ LL - let _ = iter.chain(self.my_field.into_iter());
309+ LL + let _ = iter.chain(&self.my_field);
310+ |
288311
289312error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
290313 --> tests/ui/useless_conversion.rs:365:32
291314 |
292315LL | let _ = iter.chain(self.my_field.into_iter());
293- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `&mut self.my_field`
316+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
294317 |
295318note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
296319 --> /home/sam/.rustup/toolchains/nightly-2025-01-09-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:471:12
297320 |
298321LL | U: IntoIterator<Item = Self::Item>,
299322 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
323+ help: consider removing the `.into_iter()`
324+ |
325+ LL - let _ = iter.chain(self.my_field.into_iter());
326+ LL + let _ = iter.chain(&mut self.my_field);
327+ |
300328
301329error: the following explicit lifetimes could be elided: 'a
302330 --> tests/ui/useless_conversion.rs:369:27
@@ -316,37 +344,52 @@ error: explicit call to `.into_iter()` in function argument accepting `IntoItera
316344 --> tests/ui/useless_conversion.rs:375:32
317345 |
318346LL | let _ = iter.chain(self.my_field.into_iter());
319- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `*self.my_field`
347+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
320348 |
321349note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
322350 --> /home/sam/.rustup/toolchains/nightly-2025-01-09-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:471:12
323351 |
324352LL | U: IntoIterator<Item = Self::Item>,
325353 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
354+ help: consider removing the `.into_iter()`
355+ |
356+ LL - let _ = iter.chain(self.my_field.into_iter());
357+ LL + let _ = iter.chain(*self.my_field);
358+ |
326359
327360error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
328361 --> tests/ui/useless_conversion.rs:385:32
329362 |
330363LL | let _ = iter.chain(self.my_field.into_iter());
331- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `&*self.my_field`
364+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
332365 |
333366note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
334367 --> /home/sam/.rustup/toolchains/nightly-2025-01-09-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:471:12
335368 |
336369LL | U: IntoIterator<Item = Self::Item>,
337370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
371+ help: consider removing the `.into_iter()`
372+ |
373+ LL - let _ = iter.chain(self.my_field.into_iter());
374+ LL + let _ = iter.chain(&*self.my_field);
375+ |
338376
339377error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
340378 --> tests/ui/useless_conversion.rs:395:32
341379 |
342380LL | let _ = iter.chain(self.my_field.into_iter());
343- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `&mut *self.my_field`
381+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
344382 |
345383note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
346384 --> /home/sam/.rustup/toolchains/nightly-2025-01-09-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:471:12
347385 |
348386LL | U: IntoIterator<Item = Self::Item>,
349387 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
388+ help: consider removing the `.into_iter()`
389+ |
390+ LL - let _ = iter.chain(self.my_field.into_iter());
391+ LL + let _ = iter.chain(&mut *self.my_field);
392+ |
350393
351394error: aborting due to 42 previous errors
352395
0 commit comments