Guest User

Untitled

a guest
Jan 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #![feature(existential_type)]
  2.  
  3. trait Bar {
  4. type A;
  5. }
  6.  
  7. impl Bar for () {
  8. type A = ();
  9. }
  10.  
  11. trait Foo {
  12. type A;
  13. type B: Bar<A = Self::A>;
  14.  
  15. fn foo() -> Self::B;
  16. }
  17.  
  18. impl Foo for () {
  19. type A = ();
  20. existential type B: Bar<A = Self::A>;
  21.  
  22. fn foo() -> Self::B {
  23. ()
  24. }
  25. }
Add Comment
Please, Sign In to add comment