Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. trait Foo<Input> {
  2. type Output;
  3. }
  4.  
  5. trait Bar {
  6. type Input;
  7.  
  8. fn baz<F: Foo<Self::Input>>() -> F::Output
  9. where
  10. F::Output: Default;
  11. }
  12.  
  13. impl<T> Bar for T {
  14. type Input = T;
  15.  
  16. fn baz<F: Foo<Self::Input>>() -> F::Output
  17. where
  18. F::Output: Default,
  19. {
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement