redundant_pattern_match does not trigger on matches!
macro
#10803
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
Uses of
matches
macro withResult
orOption
in first argument and in the second argument is just here to check if the first argument isis_ok()
oris_some()
, do not lint. When I makecargo expand
on this:I have:
Lint Name
redundant_pattern_match
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
Version
The text was updated successfully, but these errors were encountered: