Skip to content

wildcard_in_or_patterns doesn't ignore #[nonexhaustive] #13350

Closed
@andrewbanchich

Description

@andrewbanchich

Summary

Some types are annotated with #[nonexhaustive], forcing a wildcard pattern. This lint conflicts with that, which then forces us to use an #[allow(clippy::wildcard_in_or_patterns)].

It would be great if this lint took nonexhaustive into account so that it doesn't trigger for wildcard patterns as long as all other patterns were exhaustively matched upon.

Reproducer

No response

Version

release: 1.80.1

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions