New lint: Exhaustive pub enum becomes #[non_exhaustive]
#143
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.
If an exhaustive pub enum becomes non-exhaustive, any pattern-matching on it outside of its own crate will be broken unless it includes a wildcard pattern like
_
in the match.We already have lints for structs that become non-exhaustive and enum variants that become non-exhaustive. This lint is quite similar and should be quite easy to add.
Mentorship available.
The text was updated successfully, but these errors were encountered: