Guest User

Untitled

a guest
Oct 21st, 2019
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #[derive(Debug)]
  2. struct Point {
  3. pub x: i32,
  4. pub y: i32,
  5. }
  6.  
  7. fn main() {
  8. let primary = Point { x: -10, y: 8, };
  9. let mut reference = &primary;
  10. println!("point is: {:?}", reference);
  11. {
  12. let secondary = Point { x: 5, y: 5, };
  13. reference = &secondary;
  14. }
  15. println!("point is: {:?}", reference);
  16. }
RAW Paste Data