Non_exhaustive on trait impls

Currently, rust has the "only one impl" rule, which can cause breakages in type inference if a crate adds a second implementation of a trait.

There are often talks of disabling this via an attribute, and I think putting #[non_exhaustive] on a trait impl block wouldn't be the worst idea of how to do this.

14 Likes

That's...remarkable simple. It might just work.

1 Like