Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. struct A<'a> {
  2. other: &'a mut Box<dyn B>,
  3. pother: Box<dyn X>,
  4. }
  5.  
  6. trait B { }
  7.  
  8. struct C;
  9. impl B for C { }
  10.  
  11. trait X { }
  12.  
  13. impl<'a> X for A<'a> { }
  14.  
  15. impl<'a> A<'a> {
  16. pub fn new(o: &'a mut Box<dyn B>, p: Box<dyn X>) -> Self {
  17. Self { other: o, pother: p }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement