New lints: an enum variant changes from unit/tuple/struct to another kind. #884
Labels
A-lint
Area: new or existing lint
C-enhancement
Category: raise the bar on expectations
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-mentor
Call for participation: Mentorship is available for this issue.
Describe your use case
We have lints for when a
struct
changes "kind":tuple_struct_to_plain_struct
unit_struct_changed_kind
However, currently
cargo-semver-checks
does not check when an enum variant changes kind like this.from:
to:
the first three variants would break with:
the second three also have breakage in a similar fashion, and
cargo-semver-checks
currently does not catch thefields_missing/removed lints because these variants changed kind
Describe the solution you'd like
Thus, it would be helpful to have lint(s) that detect this change for constructible enum variants - if a tuple/struct variant is marked
#[non_exhaustive]
in the baseline version, this is not a breaking change because it was not possible to construct these variants in the baseline version.Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: