]> git.lizzy.rs Git - rust.git/blob - tests/ui/for_loop_fixable.stderr
Rollup merge of #4820 - guanqun:comment-fix, r=flip1995
[rust.git] / tests / ui / for_loop_fixable.stderr
1 error: this range is empty so this for loop will never run
2   --> $DIR/for_loop_fixable.rs:39:14
3    |
4 LL |     for i in 10..0 {
5    |              ^^^^^
6    |
7    = note: `-D clippy::reverse-range-loop` implied by `-D warnings`
8 help: consider using the following if you are attempting to iterate over this range in reverse
9    |
10 LL |     for i in (0..10).rev() {
11    |              ^^^^^^^^^^^^^
12
13 error: this range is empty so this for loop will never run
14   --> $DIR/for_loop_fixable.rs:43:14
15    |
16 LL |     for i in 10..=0 {
17    |              ^^^^^^
18    |
19 help: consider using the following if you are attempting to iterate over this range in reverse
20    |
21 LL |     for i in (0..=10).rev() {
22    |              ^^^^^^^^^^^^^^
23
24 error: this range is empty so this for loop will never run
25   --> $DIR/for_loop_fixable.rs:47:14
26    |
27 LL |     for i in MAX_LEN..0 {
28    |              ^^^^^^^^^^
29    |
30 help: consider using the following if you are attempting to iterate over this range in reverse
31    |
32 LL |     for i in (0..MAX_LEN).rev() {
33    |              ^^^^^^^^^^^^^^^^^^
34
35 error: this range is empty so this for loop will never run
36   --> $DIR/for_loop_fixable.rs:72:14
37    |
38 LL |     for i in 10..5 + 4 {
39    |              ^^^^^^^^^
40    |
41 help: consider using the following if you are attempting to iterate over this range in reverse
42    |
43 LL |     for i in (5 + 4..10).rev() {
44    |              ^^^^^^^^^^^^^^^^^
45
46 error: this range is empty so this for loop will never run
47   --> $DIR/for_loop_fixable.rs:76:14
48    |
49 LL |     for i in (5 + 2)..(3 - 1) {
50    |              ^^^^^^^^^^^^^^^^
51    |
52 help: consider using the following if you are attempting to iterate over this range in reverse
53    |
54 LL |     for i in ((3 - 1)..(5 + 2)).rev() {
55    |              ^^^^^^^^^^^^^^^^^^^^^^^^
56
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
59    |
60 LL |     for _v in vec.iter() {}
61    |               ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
62    |
63    = note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
64
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
67    |
68 LL |     for _v in vec.iter_mut() {}
69    |               ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
70
71 error: it is more concise to loop over containers instead of using explicit iteration methods`
72   --> $DIR/for_loop_fixable.rs:103:15
73    |
74 LL |     for _v in out_vec.into_iter() {}
75    |               ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
76    |
77    = note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
78
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
81    |
82 LL |     for _v in [1, 2, 3].iter() {}
83    |               ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
84
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
87    |
88 LL |     for _v in [0; 32].iter() {}
89    |               ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
90
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
93    |
94 LL |     for _v in ll.iter() {}
95    |               ^^^^^^^^^ help: to write this more concisely, try: `&ll`
96
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
99    |
100 LL |     for _v in vd.iter() {}
101    |               ^^^^^^^^^ help: to write this more concisely, try: `&vd`
102
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
105    |
106 LL |     for _v in bh.iter() {}
107    |               ^^^^^^^^^ help: to write this more concisely, try: `&bh`
108
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
111    |
112 LL |     for _v in hm.iter() {}
113    |               ^^^^^^^^^ help: to write this more concisely, try: `&hm`
114
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
117    |
118 LL |     for _v in bt.iter() {}
119    |               ^^^^^^^^^ help: to write this more concisely, try: `&bt`
120
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
123    |
124 LL |     for _v in hs.iter() {}
125    |               ^^^^^^^^^ help: to write this more concisely, try: `&hs`
126
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
129    |
130 LL |     for _v in bs.iter() {}
131    |               ^^^^^^^^^ help: to write this more concisely, try: `&bs`
132
133 error: aborting due to 17 previous errors
134