or_fun_call
doesn't suggest map_or_else
#8993
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
When calling
map_or
with a function call as the default value, clippy does not suggest writing it withmap_or_else
instead as it does for the otheror
methods.This may be related to #5821.
Lint Name
or_fun_call
Reproducer
Playground link
I expected to see this happen:
The line with
map_or
should trigger the lint, suggesting the code below it.Instead, this happened:
No lint is produced.
Version
The text was updated successfully, but these errors were encountered: