2 ms·
"private" trait impls (1) would be a much better solution. You probably never want the impl of a trait for a foreign type to be exposed to other crates, it's so
by duped 3y ago
"private" trait impls (1) would be a much better solution. You probably never want the impl of a trait for a foreign type to be exposed to other crates, it's so unlikely that forbidding it in the name of coherence would probably work out. But there's apparently many gotchas and no one has clearly written a way around them (2).
(1) https://github.com/rust-lang/rfcs/issues/493 https://github.com/rust-lang/rfcs/issues/493 (although the comment section is kind of unhinged and goes off on distant tangents to modular typeclasses and first class modules)
(2) http://smallcultfollowing.com/babysteps/blog/2015/01/14/little-orphan-impls/ http://smallcultfollowing.com/babysteps/blog/2015/01/14/litt...