Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. type int32 = i32;
  2.  
  3. struct ComplexRefs<'a>
  4. {
  5. int_ref: &'a i32,
  6. unsigned_ref: &'a u32,
  7. str_ref: &'a str,
  8. }
  9.  
  10. fn main() {
  11. let a: int32 = -432;
  12. let b: int32 = 9018239;
  13. let c: int32 = 2321;
  14.  
  15. let d: u32 = 5;
  16.  
  17.  
  18. {
  19. let str_ref: &str = "Hahaha";
  20. let cr: ComplexRefs = ComplexRefs {
  21. int_ref: &a,
  22. unsigned_ref: &d,
  23. str_ref,
  24. };
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement