Relax Trait Coherence rules to allow the implementation of a trait on generic types where the type must impl another trait owned by the current crate #1124
Labels
T-lang
Relevant to the language team, which will review and decide on the RFC.
The title is lengthy, but it boils down to this:
If I have a trait
MyRead
and I want to implementRead
for allT: MyRead
, I should be able to do so because I ownMyRead
and the impl ofRead
would (should?) only come into scope for typeT: MyRead
if and only ifMyRead
is also in scope.There must be a major hole I am missing, but this would seriously reduce code in a lot of libraries, i.e. implementing traits onto owned types individually.
The text was updated successfully, but these errors were encountered: