- Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages
Description
Description
With an enum like this one:
enum Hey { What, YaFace, }...it's possible to match it with braces in a destructuring pattern using braces with a rest pattern, e.g.:
match Hey::What { Hey::YaFace { .. } => todo!(), // ... }...despite having no fields. When refactoring enum pattern matching, these can be left in when a variant has its fields removed. It might be nice for Clippy to note when such braces are no longer necessary.
Version
rustc 1.92.0 (ded5c06cf 2025-12-08) binary: rustc commit-hash: ded5c06cf21d2b93bffd5d884aa6e96934ee4234 commit-date: 2025-12-08 host: aarch64-apple-darwin release: 1.92.0 LLVM version: 21.1.3 Additional Labels
@rustbot label C-enhancement
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages