Skip to content

match_wild_err_arm: Err(_) is not wild #3688

@tspiteri

Description

@tspiteri

The match_wild_err_arm lint documentation compares Err(_) to Java with catch(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?

Metadata

Metadata

Assignees

Labels

A-documentationArea: Adding or improving documentationC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions