@@ -71,142 +71,148 @@ LL | let e: std::vec::Vec<char> = vec!['a', 'b', 'c'].iter().map(|c| c.to_as
7171 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `char::to_ascii_uppercase`
7272
7373error: redundant closure
74- --> tests/ui/eta.rs:169:22
74+ --> tests/ui/eta.rs:122:23
75+ |
76+ LL | let _ = x.map(|x| x.parse::<i16>());
77+ | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `str::parse::<i16>`
78+
79+ error: redundant closure
80+ --> tests/ui/eta.rs:174:22
7581 |
7682LL | requires_fn_once(|| x());
7783 | ^^^^^^ help: replace the closure with the function itself: `x`
7884
7985error: redundant closure
80- --> tests/ui/eta.rs:176 :27
86+ --> tests/ui/eta.rs:181 :27
8187 |
8288LL | let a = Some(1u8).map(|a| foo_ptr(a));
8389 | ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `foo_ptr`
8490
8591error: redundant closure
86- --> tests/ui/eta.rs:181 :27
92+ --> tests/ui/eta.rs:186 :27
8793 |
8894LL | let a = Some(1u8).map(|a| closure(a));
8995 | ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `closure`
9096
9197error: redundant closure
92- --> tests/ui/eta.rs:213 :28
98+ --> tests/ui/eta.rs:218 :28
9399 |
94100LL | x.into_iter().for_each(|x| add_to_res(x));
95101 | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&mut add_to_res`
96102
97103error: redundant closure
98- --> tests/ui/eta.rs:214 :28
104+ --> tests/ui/eta.rs:219 :28
99105 |
100106LL | y.into_iter().for_each(|x| add_to_res(x));
101107 | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&mut add_to_res`
102108
103109error: redundant closure
104- --> tests/ui/eta.rs:215 :28
110+ --> tests/ui/eta.rs:220 :28
105111 |
106112LL | z.into_iter().for_each(|x| add_to_res(x));
107113 | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `add_to_res`
108114
109115error: redundant closure
110- --> tests/ui/eta.rs:222 :21
116+ --> tests/ui/eta.rs:227 :21
111117 |
112118LL | Some(1).map(|n| closure(n));
113119 | ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&mut closure`
114120
115121error: redundant closure
116- --> tests/ui/eta.rs:226 :21
122+ --> tests/ui/eta.rs:231 :21
117123 |
118124LL | Some(1).map(|n| in_loop(n));
119125 | ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `in_loop`
120126
121127error: redundant closure
122- --> tests/ui/eta.rs:319 :18
128+ --> tests/ui/eta.rs:324 :18
123129 |
124130LL | takes_fn_mut(|| f());
125131 | ^^^^^^ help: replace the closure with the function itself: `&mut f`
126132
127133error: redundant closure
128- --> tests/ui/eta.rs:322 :19
134+ --> tests/ui/eta.rs:327 :19
129135 |
130136LL | takes_fn_once(|| f());
131137 | ^^^^^^ help: replace the closure with the function itself: `&mut f`
132138
133139error: redundant closure
134- --> tests/ui/eta.rs:326 :26
140+ --> tests/ui/eta.rs:331 :26
135141 |
136142LL | move || takes_fn_mut(|| f_used_once())
137143 | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&mut f_used_once`
138144
139145error: redundant closure
140- --> tests/ui/eta.rs:338 :19
146+ --> tests/ui/eta.rs:343 :19
141147 |
142148LL | array_opt.map(|a| a.as_slice());
143149 | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `<[u8; 3]>::as_slice`
144150
145151error: redundant closure
146- --> tests/ui/eta.rs:341 :19
152+ --> tests/ui/eta.rs:346 :19
147153 |
148154LL | slice_opt.map(|s| s.len());
149155 | ^^^^^^^^^^^ help: replace the closure with the method itself: `<[u8]>::len`
150156
151157error: redundant closure
152- --> tests/ui/eta.rs:344 :17
158+ --> tests/ui/eta.rs:349 :17
153159 |
154160LL | ptr_opt.map(|p| p.is_null());
155161 | ^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `<*const usize>::is_null`
156162
157163error: redundant closure
158- --> tests/ui/eta.rs:348 :17
164+ --> tests/ui/eta.rs:353 :17
159165 |
160166LL | dyn_opt.map(|d| d.method_on_dyn());
161167 | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `<dyn TestTrait>::method_on_dyn`
162168
163169error: redundant closure
164- --> tests/ui/eta.rs:408 :19
170+ --> tests/ui/eta.rs:413 :19
165171 |
166172LL | let _ = f(&0, |x, y| f2(x, y));
167173 | ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `f2`
168174
169175error: redundant closure
170- --> tests/ui/eta.rs:436 :22
176+ --> tests/ui/eta.rs:441 :22
171177 |
172178LL | test.map(|t| t.method())
173179 | ^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Test::method`
174180
175181error: redundant closure
176- --> tests/ui/eta.rs:440 :22
182+ --> tests/ui/eta.rs:445 :22
177183 |
178184LL | test.map(|t| t.method())
179185 | ^^^^^^^^^^^^^^ help: replace the closure with the method itself: `super::Outer::method`
180186
181187error: redundant closure
182- --> tests/ui/eta.rs:453 :18
188+ --> tests/ui/eta.rs:458 :18
183189 |
184190LL | test.map(|t| t.method())
185191 | ^^^^^^^^^^^^^^ help: replace the closure with the method itself: `test_mod::Test::method`
186192
187193error: redundant closure
188- --> tests/ui/eta.rs:460 :30
194+ --> tests/ui/eta.rs:465 :30
189195 |
190196LL | test.map(|t| t.method())
191197 | ^^^^^^^^^^^^^^ help: replace the closure with the method itself: `crate::issue_10854::d::Test::method`
192198
193199error: redundant closure
194- --> tests/ui/eta.rs:479 :38
200+ --> tests/ui/eta.rs:484 :38
195201 |
196202LL | let x = Box::new(|| None.map(|x| f(x)));
197203 | ^^^^^^^^ help: replace the closure with the function itself: `&f`
198204
199205error: redundant closure
200- --> tests/ui/eta.rs:483 :38
206+ --> tests/ui/eta.rs:488 :38
201207 |
202208LL | let x = Box::new(|| None.map(|x| f(x)));
203209 | ^^^^^^^^ help: replace the closure with the function itself: `f`
204210
205211error: redundant closure
206- --> tests/ui/eta.rs:500 :35
212+ --> tests/ui/eta.rs:505 :35
207213 |
208214LL | let _field = bind.or_else(|| get_default()).unwrap();
209215 | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_default`
210216
211- error: aborting due to 34 previous errors
217+ error: aborting due to 35 previous errors
212218
0 commit comments