Hacker News new | ask | show | jobs
by sanxiyn 665 days ago
You can use #[non_exhaustive] if you want to avoid this.
1 comments

Right. This even tidily forbids the exhaustive matching for other people's code (ie requires them to write a default) using your crate but still allows it within the crate, reasoning that you should know which values you added even if you never promise an exhaustive list to your users.