Guest User

Untitled

a guest
Apr 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. trait Foo {
  2. fn foo(&self) {}
  3. }
  4.  
  5. trait FooExt: Foo {
  6. fn foo2(&self) {}
  7. }
  8.  
  9. impl<T: Foo> FooExt for T {}
  10.  
  11. fn bar<T: Foo>(t: T) {
  12. t.foo2()
  13. }
  14.  
  15. fn main() {}
Add Comment
Please, Sign In to add comment