11error: it is more concise to loop over references to containers instead of using explicit iteration methods
2- --> $DIR/explicit_iter_loop.rs:16 :14
2+ --> $DIR/explicit_iter_loop.rs:17 :14
33 |
44LL | for _ in vec.iter() {}
55 | ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
@@ -11,132 +11,106 @@ LL | #![deny(clippy::explicit_iter_loop)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
1313error: it is more concise to loop over references to containers instead of using explicit iteration methods
14- --> $DIR/explicit_iter_loop.rs:17 :14
14+ --> $DIR/explicit_iter_loop.rs:18 :14
1515 |
1616LL | for _ in vec.iter_mut() {}
1717 | ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
1818
1919error: it is more concise to loop over references to containers instead of using explicit iteration methods
20- --> $DIR/explicit_iter_loop.rs:20 :14
20+ --> $DIR/explicit_iter_loop.rs:21 :14
2121 |
2222LL | for _ in rvec.iter() {}
2323 | ^^^^^^^^^^^ help: to write this more concisely, try: `rvec`
2424
2525error: it is more concise to loop over references to containers instead of using explicit iteration methods
26- --> $DIR/explicit_iter_loop.rs:23:14
27- |
28- LL | for _ in rmvec.iter() {}
29- | ^^^^^^^^^^^^ help: to write this more concisely, try: `&*rmvec`
30-
31- error: it is more concise to loop over references to containers instead of using explicit iteration methods
32- --> $DIR/explicit_iter_loop.rs:24:14
33- |
34- LL | for _ in rmvec.iter_mut() {}
35- | ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut *rmvec`
36-
37- error: it is more concise to loop over references to containers instead of using explicit iteration methods
38- --> $DIR/explicit_iter_loop.rs:29:14
26+ --> $DIR/explicit_iter_loop.rs:30:14
3927 |
4028LL | for _ in [1, 2, 3].iter() {}
4129 | ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
4230
4331error: it is more concise to loop over references to containers instead of using explicit iteration methods
44- --> $DIR/explicit_iter_loop.rs:31:14
45- |
46- LL | for _ in (&mut [1, 2, 3]).iter() {}
47- | ^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&*(&mut [1, 2, 3])`
48-
49- error: the method `iter` doesn't need a mutable reference
50- --> $DIR/explicit_iter_loop.rs:31:14
51- |
52- LL | for _ in (&mut [1, 2, 3]).iter() {}
53- | ^^^^^^^^^^^^^^^^
54- |
55- = note: `-D clippy::unnecessary-mut-passed` implied by `-D warnings`
56-
57- error: it is more concise to loop over references to containers instead of using explicit iteration methods
58- --> $DIR/explicit_iter_loop.rs:33:14
32+ --> $DIR/explicit_iter_loop.rs:34:14
5933 |
6034LL | for _ in [0; 32].iter() {}
6135 | ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
6236
6337error: it is more concise to loop over references to containers instead of using explicit iteration methods
64- --> $DIR/explicit_iter_loop.rs:34 :14
38+ --> $DIR/explicit_iter_loop.rs:35 :14
6539 |
6640LL | for _ in [0; 33].iter() {}
6741 | ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 33]`
6842
6943error: it is more concise to loop over references to containers instead of using explicit iteration methods
70- --> $DIR/explicit_iter_loop.rs:37 :14
44+ --> $DIR/explicit_iter_loop.rs:38 :14
7145 |
7246LL | for _ in ll.iter() {}
7347 | ^^^^^^^^^ help: to write this more concisely, try: `&ll`
7448
7549error: it is more concise to loop over references to containers instead of using explicit iteration methods
76- --> $DIR/explicit_iter_loop.rs:39 :14
50+ --> $DIR/explicit_iter_loop.rs:40 :14
7751 |
7852LL | for _ in rll.iter() {}
7953 | ^^^^^^^^^^ help: to write this more concisely, try: `rll`
8054
8155error: it is more concise to loop over references to containers instead of using explicit iteration methods
82- --> $DIR/explicit_iter_loop.rs:42 :14
56+ --> $DIR/explicit_iter_loop.rs:43 :14
8357 |
8458LL | for _ in vd.iter() {}
8559 | ^^^^^^^^^ help: to write this more concisely, try: `&vd`
8660
8761error: it is more concise to loop over references to containers instead of using explicit iteration methods
88- --> $DIR/explicit_iter_loop.rs:44 :14
62+ --> $DIR/explicit_iter_loop.rs:45 :14
8963 |
9064LL | for _ in rvd.iter() {}
9165 | ^^^^^^^^^^ help: to write this more concisely, try: `rvd`
9266
9367error: it is more concise to loop over references to containers instead of using explicit iteration methods
94- --> $DIR/explicit_iter_loop.rs:47 :14
68+ --> $DIR/explicit_iter_loop.rs:48 :14
9569 |
9670LL | for _ in bh.iter() {}
9771 | ^^^^^^^^^ help: to write this more concisely, try: `&bh`
9872
9973error: it is more concise to loop over references to containers instead of using explicit iteration methods
100- --> $DIR/explicit_iter_loop.rs:50 :14
74+ --> $DIR/explicit_iter_loop.rs:51 :14
10175 |
10276LL | for _ in hm.iter() {}
10377 | ^^^^^^^^^ help: to write this more concisely, try: `&hm`
10478
10579error: it is more concise to loop over references to containers instead of using explicit iteration methods
106- --> $DIR/explicit_iter_loop.rs:53 :14
80+ --> $DIR/explicit_iter_loop.rs:54 :14
10781 |
10882LL | for _ in bt.iter() {}
10983 | ^^^^^^^^^ help: to write this more concisely, try: `&bt`
11084
11185error: it is more concise to loop over references to containers instead of using explicit iteration methods
112- --> $DIR/explicit_iter_loop.rs:56 :14
86+ --> $DIR/explicit_iter_loop.rs:57 :14
11387 |
11488LL | for _ in hs.iter() {}
11589 | ^^^^^^^^^ help: to write this more concisely, try: `&hs`
11690
11791error: it is more concise to loop over references to containers instead of using explicit iteration methods
118- --> $DIR/explicit_iter_loop.rs:59 :14
92+ --> $DIR/explicit_iter_loop.rs:60 :14
11993 |
12094LL | for _ in bs.iter() {}
12195 | ^^^^^^^^^ help: to write this more concisely, try: `&bs`
12296
12397error: it is more concise to loop over references to containers instead of using explicit iteration methods
124- --> $DIR/explicit_iter_loop.rs:148 :14
98+ --> $DIR/explicit_iter_loop.rs:149 :14
12599 |
126100LL | for _ in x.iter() {}
127101 | ^^^^^^^^ help: to write this more concisely, try: `&x`
128102
129103error: it is more concise to loop over references to containers instead of using explicit iteration methods
130- --> $DIR/explicit_iter_loop.rs:149 :14
104+ --> $DIR/explicit_iter_loop.rs:150 :14
131105 |
132106LL | for _ in x.iter_mut() {}
133107 | ^^^^^^^^^^^^ help: to write this more concisely, try: `&mut x`
134108
135109error: it is more concise to loop over references to containers instead of using explicit iteration methods
136- --> $DIR/explicit_iter_loop.rs:152 :14
110+ --> $DIR/explicit_iter_loop.rs:153 :14
137111 |
138112LL | for _ in r.iter() {}
139113 | ^^^^^^^^ help: to write this more concisely, try: `r`
140114
141- error: aborting due to 22 previous errors
115+ error: aborting due to 18 previous errors
142116
0 commit comments