Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add two lints for cases where enum discriminants are no longer defined. #1037

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

obi1kenobi
Copy link
Owner

  • enum_discriminants_undefined_non_exhaustive_variant checks for enums that gain a new non-exhaustive variant, which then causes the discriminant to become undefined.
  • enum_discriminants_undefined_non_unit_variant checks for enums that gain a new non-unit variant, which then causes the discriminant to become undefined.

Resolves #898.

@obi1kenobi obi1kenobi enabled auto-merge (squash) December 11, 2024 03:54
- `enum_discriminants_undefined_non_exhaustive_variant` checks for enums that gain a new non-exhaustive variant, which then causes the discriminant to become undefined.
- `enum_discriminants_undefined_non_unit_variant` checks for enums that gain a new non-unit variant, which then causes the discriminant to become undefined.

Resolves #898.
@obi1kenobi obi1kenobi force-pushed the lints_for_discriminants_becoming_undefined branch from 040e66d to 96b22d0 Compare December 11, 2024 04:46
@obi1kenobi obi1kenobi merged commit 4106eea into main Dec 11, 2024
30 checks passed
@obi1kenobi obi1kenobi deleted the lints_for_discriminants_becoming_undefined branch December 11, 2024 04:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lints: Changes to enum variant discriminants
1 participant