Open
Description
Description
there are lints that check (or at least should be checking) for match
or if-let
on Option
or Result
, such as [question_mark
], which checks all combinations now.
But there are some lints that either checks only match
exprs on Option
and Result
, or checks match
and if-let
on Option
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):
Lint Name | What's Missing | PR # | Finished |
---|---|---|---|
manual_unwrap_or |
linting for if-let expressions |
||
manual_unwrap_or_default |
linting for Result type |
||
manual_let_else (somewhat belongs to this list... I think) |
linting for Result type (The pat_and_expr_can_be_question_mark could use some improvement, since not only Option s can use question mark, any types that impls Try trait can use it, like Result ofc) |
Not in the list but could someone plz confirm that the problem which [if_let_mutex
] trying to prevent can or cannot happen with match
?
Version
No response
Additional Labels
@rustbot label +I-false-nagative +C-enhancement +good-first-issue