@@ -155,61 +155,61 @@ LL | let _ = Some(4).map_or(g(), f);
155
155
| ^^^^^^^^^^^^^^ help: try: `map_or_else(g, f)`
156
156
157
157
error: use of `unwrap_or_else` to construct default value
158
- --> tests/ui/or_fun_call.rs:315 :18
158
+ --> tests/ui/or_fun_call.rs:316 :18
159
159
|
160
160
LL | with_new.unwrap_or_else(Vec::new);
161
161
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
162
162
163
163
error: use of `unwrap_or_else` to construct default value
164
- --> tests/ui/or_fun_call.rs:319 :28
164
+ --> tests/ui/or_fun_call.rs:320 :28
165
165
|
166
166
LL | with_default_trait.unwrap_or_else(Default::default);
167
167
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
168
168
169
169
error: use of `unwrap_or_else` to construct default value
170
- --> tests/ui/or_fun_call.rs:323 :27
170
+ --> tests/ui/or_fun_call.rs:324 :27
171
171
|
172
172
LL | with_default_type.unwrap_or_else(u64::default);
173
173
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
174
174
175
175
error: use of `unwrap_or_else` to construct default value
176
- --> tests/ui/or_fun_call.rs:327 :22
176
+ --> tests/ui/or_fun_call.rs:328 :22
177
177
|
178
178
LL | real_default.unwrap_or_else(<FakeDefault as Default>::default);
179
179
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
180
180
181
181
error: use of `or_insert_with` to construct default value
182
- --> tests/ui/or_fun_call.rs:331 :23
182
+ --> tests/ui/or_fun_call.rs:332 :23
183
183
|
184
184
LL | map.entry(42).or_insert_with(String::new);
185
185
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
186
186
187
187
error: use of `or_insert_with` to construct default value
188
- --> tests/ui/or_fun_call.rs:335 :25
188
+ --> tests/ui/or_fun_call.rs:336 :25
189
189
|
190
190
LL | btree.entry(42).or_insert_with(String::new);
191
191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
192
192
193
193
error: use of `unwrap_or_else` to construct default value
194
- --> tests/ui/or_fun_call.rs:339 :25
194
+ --> tests/ui/or_fun_call.rs:340 :25
195
195
|
196
196
LL | let _ = stringy.unwrap_or_else(String::new);
197
197
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
198
198
199
199
error: function call inside of `unwrap_or`
200
- --> tests/ui/or_fun_call.rs:381 :17
200
+ --> tests/ui/or_fun_call.rs:382 :17
201
201
|
202
202
LL | let _ = opt.unwrap_or({ f() }); // suggest `.unwrap_or_else(f)`
203
203
| ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(f)`
204
204
205
205
error: function call inside of `unwrap_or`
206
- --> tests/ui/or_fun_call.rs:386 :17
206
+ --> tests/ui/or_fun_call.rs:387 :17
207
207
|
208
208
LL | let _ = opt.unwrap_or(f() + 1); // suggest `.unwrap_or_else(|| f() + 1)`
209
209
| ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| f() + 1)`
210
210
211
211
error: function call inside of `unwrap_or`
212
- --> tests/ui/or_fun_call.rs:391 :17
212
+ --> tests/ui/or_fun_call.rs:392 :17
213
213
|
214
214
LL | let _ = opt.unwrap_or({
215
215
| _________________^
@@ -229,49 +229,49 @@ LL ~ });
229
229
|
230
230
231
231
error: function call inside of `map_or`
232
- --> tests/ui/or_fun_call.rs:397 :17
232
+ --> tests/ui/or_fun_call.rs:398 :17
233
233
|
234
234
LL | let _ = opt.map_or(f() + 1, |v| v); // suggest `.map_or_else(|| f() + 1, |v| v)`
235
235
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_or_else(|| f() + 1, |v| v)`
236
236
237
237
error: use of `unwrap_or` to construct default value
238
- --> tests/ui/or_fun_call.rs:402 :17
238
+ --> tests/ui/or_fun_call.rs:403 :17
239
239
|
240
240
LL | let _ = opt.unwrap_or({ i32::default() });
241
241
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
242
242
243
243
error: function call inside of `unwrap_or`
244
- --> tests/ui/or_fun_call.rs:409 :21
244
+ --> tests/ui/or_fun_call.rs:410 :21
245
245
|
246
246
LL | let _ = opt_foo.unwrap_or(Foo { val: String::default() });
247
247
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| Foo { val: String::default() })`
248
248
249
249
error: function call inside of `map_or`
250
- --> tests/ui/or_fun_call.rs:424 :19
250
+ --> tests/ui/or_fun_call.rs:425 :19
251
251
|
252
252
LL | let _ = x.map_or(g(), |v| v);
253
253
| ^^^^^^^^^^^^^^^^^^ help: try: `map_or_else(|_| g(), |v| v)`
254
254
255
255
error: function call inside of `map_or`
256
- --> tests/ui/or_fun_call.rs:426 :19
256
+ --> tests/ui/or_fun_call.rs:427 :19
257
257
|
258
258
LL | let _ = x.map_or(g(), f);
259
259
| ^^^^^^^^^^^^^^ help: try: `map_or_else(|_| g(), f)`
260
260
261
261
error: function call inside of `get_or_insert`
262
- --> tests/ui/or_fun_call.rs:438 :15
262
+ --> tests/ui/or_fun_call.rs:440 :15
263
263
|
264
264
LL | let _ = x.get_or_insert(g());
265
265
| ^^^^^^^^^^^^^^^^^^ help: try: `get_or_insert_with(g)`
266
266
267
267
error: function call inside of `and`
268
- --> tests/ui/or_fun_call.rs:448 :15
268
+ --> tests/ui/or_fun_call.rs:450 :15
269
269
|
270
270
LL | let _ = x.and(g());
271
271
| ^^^^^^^^ help: try: `and_then(|_| g())`
272
272
273
273
error: function call inside of `and`
274
- --> tests/ui/or_fun_call.rs:458 :15
274
+ --> tests/ui/or_fun_call.rs:460 :15
275
275
|
276
276
LL | let _ = x.and(g());
277
277
| ^^^^^^^^ help: try: `and_then(|_| g())`
0 commit comments