Guest User

Untitled

a guest
Aug 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #[derive(Debug)]
  2. struct Foo;
  3.  
  4. struct Bar {
  5. a: Foo,
  6. b: Foo,
  7. }
  8.  
  9. fn main() {
  10. let x = Box::new(Bar {a: Foo, b: Foo});
  11. let x = *x;
  12. let Bar {a, b} = x;
  13. println!("{:?} {:?}", a, b);
  14. }
Add Comment
Please, Sign In to add comment