Option::is_none_or
: unnecessary_map_or
lint doesn't work on references
#14023
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
Using
Option::map_or
to emulatesOption::is_none_or
fails to generate a warning when dereferencing.Lint Name
unnecessary_map_or
Reproducer
Running this code
link to the playground
I expected a warning for each case, so three in total
Instead, this happened:
Version
The text was updated successfully, but these errors were encountered: