Allow trait bounds to be strict, e.g. in strict context
T: Trait1 + Trait2 + ... would means that
T implements exactly
Trait1 + Trait2 + ....
- Enable negative reasoning on trait bounds.
- Solve the intersecting implementation cases not supported by specialization.
Interaction with specialization
Implementations using strict trait bounds would always be more specific than those which don't.
Interaction with auto traits
Auto traits would be implicitly added to strict trait bounds unless opted out.
Would like to hear some feedback on this very simple idea. At first glance it seems to avoid the pitfalls of negative trait bounds (
!Trait) while still enabling negative reasoning.