-
Notifications
You must be signed in to change notification settings - Fork 2k
match_wild_err_arm: Err(_) is not wild #3688
Copy link
Copy link
Closed
Labels
A-documentationArea: Adding or improving documentationArea: Adding or improving documentationC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Metadata
Metadata
Assignees
Labels
A-documentationArea: Adding or improving documentationArea: Adding or improving documentationC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Type
Fields
Give feedbackNo fields configured for issues without a type.
The match_wild_err_arm lint documentation compares
Err(_)to Java withcatch(Exception), but it is nothing like it. While the Java version does catch all exceptions, the Rust version can only catch one error type.Even the warning message provided is misguided. It recommends matching each error separately, but there is only one error to match.
This makes this lint not really helpful. Or am I missing something?