Ixrec / rust-orphan-rules

An unofficial, experimental place for documenting and gathering feedback on the design problems around Rust's orphan rules
Apache License 2.0
194 stars 3 forks source link

Allow "local" orphan impls that only affect behavior within your own crate #13

Open Ixrec opened 6 years ago

Ixrec commented 6 years ago

Keeping the impls local would prevent the problems with actually embracing incoherence. But that is a very strong restriction, so it's not clear to me is whether there are any use cases that would a) actually be solved by this, and b) would not be better off with a newtype.

Ixrec commented 6 years ago

This appears to be what https://internals.rust-lang.org/t/revisit-orphan-rules/7795 and https://internals.rust-lang.org/t/thoughts-on-pub-impl/7819 are proposing, though it's not entirely clear.