@@ -292,183 +292,175 @@ error: this range is empty so this for loop will never run
292
292
186 | | }
293
293
| |_____^
294
294
295
- error: use of deprecated item: replaced by `Iterator::step_by`
296
- --> for_loop.rs:192:22
297
- |
298
- 192 | for i in (10..8).step_by(-1) {
299
- | ^^^^^^^
300
- |
301
- = note: `-D deprecated` implied by `-D warnings`
302
-
303
295
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
304
- --> for_loop.rs:207 :15
296
+ --> for_loop.rs:203 :15
305
297
|
306
- 207 | for _v in vec.iter() { }
298
+ 203 | for _v in vec.iter() { }
307
299
| ^^^^^^^^^^ help: to write this more concisely, try `&vec`
308
300
|
309
301
= note: `-D explicit-iter-loop` implied by `-D warnings`
310
302
311
303
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
312
- --> for_loop.rs:209 :15
304
+ --> for_loop.rs:205 :15
313
305
|
314
- 209 | for _v in vec.iter_mut() { }
306
+ 205 | for _v in vec.iter_mut() { }
315
307
| ^^^^^^^^^^^^^^ help: to write this more concisely, try `&mut vec`
316
308
317
309
error: it is more idiomatic to loop over containers instead of using explicit iteration methods`
318
- --> for_loop.rs:212 :15
310
+ --> for_loop.rs:208 :15
319
311
|
320
- 212 | for _v in out_vec.into_iter() { }
312
+ 208 | for _v in out_vec.into_iter() { }
321
313
| ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try `out_vec`
322
314
|
323
315
= note: `-D explicit-into-iter-loop` implied by `-D warnings`
324
316
325
317
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
326
- --> for_loop.rs:215 :15
318
+ --> for_loop.rs:211 :15
327
319
|
328
- 215 | for _v in array.into_iter() {}
320
+ 211 | for _v in array.into_iter() {}
329
321
| ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try `&array`
330
322
331
323
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
332
- --> for_loop.rs:220 :15
324
+ --> for_loop.rs:216 :15
333
325
|
334
- 220 | for _v in [1, 2, 3].iter() { }
326
+ 216 | for _v in [1, 2, 3].iter() { }
335
327
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try `&[1, 2, 3]`
336
328
337
329
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
338
- --> for_loop.rs:224 :15
330
+ --> for_loop.rs:220 :15
339
331
|
340
- 224 | for _v in [0; 32].iter() {}
332
+ 220 | for _v in [0; 32].iter() {}
341
333
| ^^^^^^^^^^^^^^ help: to write this more concisely, try `&[0; 32]`
342
334
343
335
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
344
- --> for_loop.rs:229 :15
336
+ --> for_loop.rs:225 :15
345
337
|
346
- 229 | for _v in ll.iter() { }
338
+ 225 | for _v in ll.iter() { }
347
339
| ^^^^^^^^^ help: to write this more concisely, try `&ll`
348
340
349
341
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
350
- --> for_loop.rs:232 :15
342
+ --> for_loop.rs:228 :15
351
343
|
352
- 232 | for _v in vd.iter() { }
344
+ 228 | for _v in vd.iter() { }
353
345
| ^^^^^^^^^ help: to write this more concisely, try `&vd`
354
346
355
347
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
356
- --> for_loop.rs:235 :15
348
+ --> for_loop.rs:231 :15
357
349
|
358
- 235 | for _v in bh.iter() { }
350
+ 231 | for _v in bh.iter() { }
359
351
| ^^^^^^^^^ help: to write this more concisely, try `&bh`
360
352
361
353
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
362
- --> for_loop.rs:238 :15
354
+ --> for_loop.rs:234 :15
363
355
|
364
- 238 | for _v in hm.iter() { }
356
+ 234 | for _v in hm.iter() { }
365
357
| ^^^^^^^^^ help: to write this more concisely, try `&hm`
366
358
367
359
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
368
- --> for_loop.rs:241 :15
360
+ --> for_loop.rs:237 :15
369
361
|
370
- 241 | for _v in bt.iter() { }
362
+ 237 | for _v in bt.iter() { }
371
363
| ^^^^^^^^^ help: to write this more concisely, try `&bt`
372
364
373
365
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
374
- --> for_loop.rs:244 :15
366
+ --> for_loop.rs:240 :15
375
367
|
376
- 244 | for _v in hs.iter() { }
368
+ 240 | for _v in hs.iter() { }
377
369
| ^^^^^^^^^ help: to write this more concisely, try `&hs`
378
370
379
371
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
380
- --> for_loop.rs:247 :15
372
+ --> for_loop.rs:243 :15
381
373
|
382
- 247 | for _v in bs.iter() { }
374
+ 243 | for _v in bs.iter() { }
383
375
| ^^^^^^^^^ help: to write this more concisely, try `&bs`
384
376
385
377
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
386
- --> for_loop.rs:249 :5
378
+ --> for_loop.rs:245 :5
387
379
|
388
- 249 | for _v in vec.iter().next() { }
380
+ 245 | for _v in vec.iter().next() { }
389
381
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
390
382
391
383
error: you are collect()ing an iterator and throwing away the result. Consider using an explicit for loop to exhaust the iterator
392
- --> for_loop.rs:256 :5
384
+ --> for_loop.rs:252 :5
393
385
|
394
- 256 | vec.iter().map(|x| out.push(x)).collect::<Vec<_>>();
386
+ 252 | vec.iter().map(|x| out.push(x)).collect::<Vec<_>>();
395
387
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
396
388
|
397
389
= note: `-D unused-collect` implied by `-D warnings`
398
390
399
391
error: the variable `_index` is used as a loop counter. Consider using `for (_index, item) in &vec.enumerate()` or similar iterators
400
- --> for_loop.rs:261 :5
392
+ --> for_loop.rs:257 :5
401
393
|
402
- 261 | for _v in &vec { _index += 1 }
394
+ 257 | for _v in &vec { _index += 1 }
403
395
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
404
396
|
405
397
= note: `-D explicit-counter-loop` implied by `-D warnings`
406
398
407
399
error: the variable `_index` is used as a loop counter. Consider using `for (_index, item) in &vec.enumerate()` or similar iterators
408
- --> for_loop.rs:265 :5
400
+ --> for_loop.rs:261 :5
409
401
|
410
- 265 | for _v in &vec { _index += 1 }
402
+ 261 | for _v in &vec { _index += 1 }
411
403
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
412
404
413
405
error: you seem to want to iterate on a map's values
414
- --> for_loop.rs:325 :5
406
+ --> for_loop.rs:321 :5
415
407
|
416
- 325 | / for (_, v) in &m {
417
- 326 | | let _v = v;
418
- 327 | | }
408
+ 321 | / for (_, v) in &m {
409
+ 322 | | let _v = v;
410
+ 323 | | }
419
411
| |_____^
420
412
|
421
413
= note: `-D for-kv-map` implied by `-D warnings`
422
414
help: use the corresponding method
423
415
| for v in m.values() {
424
416
425
417
error: you seem to want to iterate on a map's values
426
- --> for_loop.rs:330 :5
418
+ --> for_loop.rs:326 :5
427
419
|
428
- 330 | / for (_, v) in &*m {
429
- 331 | | let _v = v;
430
- 332 | | // Here the `*` is not actually necesarry, but the test tests that we don't suggest
431
- 333 | | // `in *m.values()` as we used to
432
- 334 | | }
420
+ 326 | / for (_, v) in &*m {
421
+ 327 | | let _v = v;
422
+ 328 | | // Here the `*` is not actually necesarry, but the test tests that we don't suggest
423
+ 329 | | // `in *m.values()` as we used to
424
+ 330 | | }
433
425
| |_____^
434
426
|
435
427
help: use the corresponding method
436
428
| for v in (*m).values() {
437
429
438
430
error: you seem to want to iterate on a map's values
439
- --> for_loop.rs:337 :5
431
+ --> for_loop.rs:333 :5
440
432
|
441
- 337 | / for (_, v) in &mut m {
442
- 338 | | let _v = v;
443
- 339 | | }
433
+ 333 | / for (_, v) in &mut m {
434
+ 334 | | let _v = v;
435
+ 335 | | }
444
436
| |_____^
445
437
|
446
438
help: use the corresponding method
447
439
| for v in m.values_mut() {
448
440
449
441
error: you seem to want to iterate on a map's values
450
- --> for_loop.rs:342 :5
442
+ --> for_loop.rs:338 :5
451
443
|
452
- 342 | / for (_, v) in &mut *m {
453
- 343 | | let _v = v;
454
- 344 | | }
444
+ 338 | / for (_, v) in &mut *m {
445
+ 339 | | let _v = v;
446
+ 340 | | }
455
447
| |_____^
456
448
|
457
449
help: use the corresponding method
458
450
| for v in (*m).values_mut() {
459
451
460
452
error: you seem to want to iterate on a map's keys
461
- --> for_loop.rs:348 :5
453
+ --> for_loop.rs:344 :5
462
454
|
463
- 348 | / for (k, _value) in rm {
464
- 349 | | let _k = k;
465
- 350 | | }
455
+ 344 | / for (k, _value) in rm {
456
+ 345 | | let _k = k;
457
+ 346 | | }
466
458
| |_____^
467
459
|
468
460
help: use the corresponding method
469
461
| for k in rm.keys() {
470
462
471
- error: aborting due to 52 previous errors
463
+ error: aborting due to 51 previous errors
472
464
473
465
474
466
To learn more, run the command again with --verbose.
0 commit comments