@@ -59,115 +59,115 @@ LL | .fold(false, |acc, x| acc || x > 2);
5959 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
6060
6161error: this `.fold` can be written more succinctly using another method
62- --> tests/ui/unnecessary_fold.rs:68 :33
62+ --> tests/ui/unnecessary_fold.rs:67 :33
6363 |
6464LL | assert_eq!(map.values().fold(0, |x, y| x + y), 0);
6565 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
6666
6767error: this `.fold` can be written more succinctly using another method
68- --> tests/ui/unnecessary_fold.rs:71 :30
68+ --> tests/ui/unnecessary_fold.rs:70 :30
6969 |
7070LL | let _ = map.values().fold(0, |x, y| x + y);
7171 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
7272
7373error: this `.fold` can be written more succinctly using another method
74- --> tests/ui/unnecessary_fold.rs:72 :30
74+ --> tests/ui/unnecessary_fold.rs:71 :30
7575 |
7676LL | let _ = map.values().fold(0, Add::add);
7777 | ^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
7878
7979error: this `.fold` can be written more succinctly using another method
80- --> tests/ui/unnecessary_fold.rs:73 :30
80+ --> tests/ui/unnecessary_fold.rs:72 :30
8181 |
8282LL | let _ = map.values().fold(1, |x, y| x * y);
8383 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
8484
8585error: this `.fold` can be written more succinctly using another method
86- --> tests/ui/unnecessary_fold.rs:74 :30
86+ --> tests/ui/unnecessary_fold.rs:73 :30
8787 |
8888LL | let _ = map.values().fold(1, Mul::mul);
8989 | ^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
9090
9191error: this `.fold` can be written more succinctly using another method
92- --> tests/ui/unnecessary_fold.rs:75 :35
92+ --> tests/ui/unnecessary_fold.rs:74 :35
9393 |
9494LL | let _: i32 = map.values().fold(0, |x, y| x + y);
9595 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
9696
9797error: this `.fold` can be written more succinctly using another method
98- --> tests/ui/unnecessary_fold.rs:76 :35
98+ --> tests/ui/unnecessary_fold.rs:75 :35
9999 |
100100LL | let _: i32 = map.values().fold(0, Add::add);
101101 | ^^^^^^^^^^^^^^^^^ help: try: `sum()`
102102
103103error: this `.fold` can be written more succinctly using another method
104- --> tests/ui/unnecessary_fold.rs:77 :35
104+ --> tests/ui/unnecessary_fold.rs:76 :35
105105 |
106106LL | let _: i32 = map.values().fold(1, |x, y| x * y);
107107 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
108108
109109error: this `.fold` can be written more succinctly using another method
110- --> tests/ui/unnecessary_fold.rs:78 :35
110+ --> tests/ui/unnecessary_fold.rs:77 :35
111111 |
112112LL | let _: i32 = map.values().fold(1, Mul::mul);
113113 | ^^^^^^^^^^^^^^^^^ help: try: `product()`
114114
115115error: this `.fold` can be written more succinctly using another method
116- --> tests/ui/unnecessary_fold.rs:79 :31
116+ --> tests/ui/unnecessary_fold.rs:78 :31
117117 |
118118LL | anything(map.values().fold(0, |x, y| x + y));
119119 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
120120
121121error: this `.fold` can be written more succinctly using another method
122- --> tests/ui/unnecessary_fold.rs:80 :31
122+ --> tests/ui/unnecessary_fold.rs:79 :31
123123 |
124124LL | anything(map.values().fold(0, Add::add));
125125 | ^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
126126
127127error: this `.fold` can be written more succinctly using another method
128- --> tests/ui/unnecessary_fold.rs:81 :31
128+ --> tests/ui/unnecessary_fold.rs:80 :31
129129 |
130130LL | anything(map.values().fold(1, |x, y| x * y));
131131 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
132132
133133error: this `.fold` can be written more succinctly using another method
134- --> tests/ui/unnecessary_fold.rs:82 :31
134+ --> tests/ui/unnecessary_fold.rs:81 :31
135135 |
136136LL | anything(map.values().fold(1, Mul::mul));
137137 | ^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
138138
139139error: this `.fold` can be written more succinctly using another method
140- --> tests/ui/unnecessary_fold.rs:83 :26
140+ --> tests/ui/unnecessary_fold.rs:82 :26
141141 |
142142LL | num(map.values().fold(0, |x, y| x + y));
143143 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
144144
145145error: this `.fold` can be written more succinctly using another method
146- --> tests/ui/unnecessary_fold.rs:84 :26
146+ --> tests/ui/unnecessary_fold.rs:83 :26
147147 |
148148LL | num(map.values().fold(0, Add::add));
149149 | ^^^^^^^^^^^^^^^^^ help: try: `sum()`
150150
151151error: this `.fold` can be written more succinctly using another method
152- --> tests/ui/unnecessary_fold.rs:85 :26
152+ --> tests/ui/unnecessary_fold.rs:84 :26
153153 |
154154LL | num(map.values().fold(1, |x, y| x * y));
155155 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
156156
157157error: this `.fold` can be written more succinctly using another method
158- --> tests/ui/unnecessary_fold.rs:86 :26
158+ --> tests/ui/unnecessary_fold.rs:85 :26
159159 |
160160LL | num(map.values().fold(1, Mul::mul));
161161 | ^^^^^^^^^^^^^^^^^ help: try: `product()`
162162
163163error: this `.fold` can be written more succinctly using another method
164- --> tests/ui/unnecessary_fold.rs:92 :16
164+ --> tests/ui/unnecessary_fold.rs:91 :16
165165 |
166166LL | (0..3).fold(0, |acc, x| acc + x)
167167 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
168168
169169error: this `.fold` can be written more succinctly using another method
170- --> tests/ui/unnecessary_fold.rs:95 :16
170+ --> tests/ui/unnecessary_fold.rs:94 :16
171171 |
172172LL | (0..3).fold(0, |acc, x| acc + x)
173173 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
0 commit comments