Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(existential_type)]
- trait Bar {
- type A;
- }
- impl Bar for () {
- type A = ();
- }
- trait Foo {
- type A;
- type B: Bar<A = Self::A>;
- fn foo() -> Self::B;
- }
- impl Foo for () {
- type A = ();
- existential type B: Bar<A = Self::A>;
- fn foo() -> Self::B {
- ()
- }
- }
Add Comment
Please, Sign In to add comment