Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "orphan impl-only" crates that must be directly chosen by the root crate #16

Open
Ixrec opened this issue Jul 8, 2018 · 0 comments
Labels

Comments

@Ixrec
Copy link
Owner

Ixrec commented Jul 8, 2018

For the official orphans problem, you typically want a crate that contains nothing but the official orphan impls. If such a crate can only be used by the root crate, then the user should be able to select just one orphan impl crate for each impl they require, thereby avoiding coherence problems without the need to bless the orphan impl crate.

The problem with this is that it only helps applications/root crates, and it's not clear that the use cases for "official orphans" are unique to applications, or even more common in applications. Plus, this would go against the principle that you should be able to break up any well-factored application into one or more library crates.

Appears to be part of what's proposed in https://internals.rust-lang.org/t/another-proposal-for-overcoming-orphan-impl-limitations/3863 and https://internals.rust-lang.org/t/suppress-coherence-checking-in-binaries/3491?u=ixrec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant