-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
A-apiArea: Stable APIArea: Stable APIC-enhancementCategory: New feature or requestCategory: New feature or requestE-good-first-issueParticipation: Good for newcomersParticipation: Good for newcomers
Description
Almost every enum and struct in the API has the #[non_exhaustive]
marker to ensure that it can easily be expanded. This is nice for stability, but not ideal for driver implementations. There could also be users who would prefer a failing compilation, rather than adding wildcards to every match statement.
For this reason, I would like to have a feature (which is enabled by default) that can enable the #[non_exhaustive]
marker.
The implementation will probably be as simple as using:
#[cfg_attr(feature = "add-non-exhaustive", non_exhaustive)]
The feature name is just an example, another name might be better
The feature should also include some documentation, that disabling it (not using default features) might cause compilation failures when the API is updated.
Metadata
Metadata
Assignees
Labels
A-apiArea: Stable APIArea: Stable APIC-enhancementCategory: New feature or requestCategory: New feature or requestE-good-first-issueParticipation: Good for newcomersParticipation: Good for newcomers