Guest User

Untitled

a guest
Mar 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. use std::collections::HashMap;
  2.  
  3. pub trait Encodable: Sized {}
  4.  
  5. impl<'a, K, V, S> Encodable for &'a HashMap<K, V, S>
  6. where
  7. V: 'a, // It will also crash if we delete this condition
  8. &'a V: Encodable,
  9. {}
  10.  
  11. pub trait Inner where for <'a> &'a Self: Encodable {}
  12.  
  13. pub trait Outer {
  14. type Inner: Inner;
  15. }
  16.  
  17. fn main() {}
Add Comment
Please, Sign In to add comment