| trait A {} | |
| trait B {} | |
| // The impl we want to allow to be added without breakage | |
| impl<T: A> B for T {} | |
| trait Assoc { | |
| type Out; | |
| } | |
| impl<T> Assoc for T where T: A + B { | |
| type Out = (); | |
| } | |
| impl<T> Foo for T where T: A, T: Assoc {} | |
| // The `Out = ()` constraint here is basically a proxy for `T: A + B` | |
| impl<T> Foo for T where T: A, T: Assoc, T: Assoc<Out = ()> {} | |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
lee-at-gusto
commented
Jan 28, 2017
•
|
This crate would be broken by impl line 5 regardless of impls line 15 and 18. struct Foo;
impl A for Foo { }
impl Assoc for Foo {
type Out = String;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This crate would be broken by impl line 5 regardless of impls line 15 and 18.