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

publicly export constraint::Constraint but seal it #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

changhe3
Copy link

@changhe3 changhe3 commented Sep 7, 2021

Currently you cannot meaningfully implement trait or inherent implementations with respect to Proxy<T, P> since you cannot name P: Constraint<T>. By sealing it, only the crate itself can directly implement the Constraint trait, but everyone else can write things like:

impl<T, P: Constraint<T>> SomeTrait<Proxy<T, P>> for MyStruct {}

@changhe3 changhe3 marked this pull request as ready for review September 7, 2021 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant