-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Lint warning for pattern bindings with the same name as a variant #4639
Copy link
Copy link
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priorityLow priority
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priorityLow priority
Type
Fields
Give feedbackNo fields configured for issues without a type.
Related to #4612 and #3070, it would be good to have a lint rule like: If there is ever a variable binding "foo" whose type is an enum E that includes a variant named "foo", report a warning. This should probably be done in the exhaustiveness or type checker so that the warning is reported early in compilation.
I'm tossing on the 1.0 list as another of those "very nice to have when you are dotting your i's and crossing your t's" sort of things.