Tracking Issue: lints that lint against match
and if-let
s should be more consistent
#12618
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
C-tracking-issue
Category: Tracking Issue
good-first-issue
These issues are a good way to get started with Clippy
Description
there are lints that check (or at least should be checking) for
match
orif-let
onOption
orResult
, such as [question_mark
], which checks all combinations now.But there are some lints that either checks only
match
exprs onOption
andResult
, or checksmatch
andif-let
onOption
s, which does not seems consistent, consider the same rules could be applied for both.Here is a short list of lints that I found which has this problem (I didn't went into it enough so it's highly possible there are missing some lint, ping me to add them in):
manual_unwrap_or
if-let
expressionsmanual_unwrap_or_default
Result
typemanual_let_else
(somewhat belongs to this list... I think)Result
type(The
pat_and_expr_can_be_question_mark
could use some improvement, since not onlyOption
s can use question mark, any types that implsTry
trait can use it, likeResult
ofc)Not in the list but could someone plz confirm that the problem which [
if_let_mutex
] trying to prevent can or cannot happen withmatch
?Version
No response
Additional Labels
@rustbot label +I-false-nagative +C-enhancement +good-first-issue
The text was updated successfully, but these errors were encountered: