One of my favorite features of Rust is that you can write code in a way that ensures the compiler will guide you when things are changed in the future. One way I achieve this is by always matching on every enum variant and use struct deconstruction without a .. pattern when possible. This way, when new members or enum varians are added my code stops compiling and I can go and fix it.
Recently however it is more and more common for library authors to add the
non_exhaustive attribute to enums. Because of this I am no longer able to force my code to fail when the library changes. The reason for this seems to me to be that crate authors want to change their enums without changing the semver of their crate.
While this is not a problem in many cases, what I don't get is why there is no way to ignore this attribute. At least for enums. I want my crate to stop compiling when new variants are added, but have no idea how to achieve that today.
Edit: It appears this is already solved by clippy, it just has to be manually enabled trough
#![deny(clippy::wildcard_enum_match_arm)], thanks @illicitonion for pointing it out.