daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![feature(nll)]
  2.  
  3. trait MyTrait {}
  4.  
  5. struct Foo {}
  6.  
  7. impl MyTrait for Foo {}
  8.  
  9. struct Bar<'a> {
  10.     things: Vec<&'a MyTrait>,
  11. }
  12.  
  13. impl<'a> MyTrait for Bar<'a> {}
  14.  
  15. fn main() {
  16.     let bar = Bar {
  17.         things: vec![&Foo {}, &Bar { things: vec![] }],
  18.     };
  19. }
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