SHARE
TWEET

Untitled

a guest Oct 14th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trait Foo {}
  2.  
  3. trait Bar: Foo {}
  4.  
  5. impl<T: Foo> Bar for T {}
  6.  
  7. struct A;
  8.  
  9. impl Foo for A {}
  10.  
  11. fn take_bar(_: impl Bar) {}
  12.  
  13. fn main() {
  14.     take_bar(A);
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top