SHARE
TWEET

Untitled

a guest Apr 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const X: u64 = 1;
  2. static mut Y: u64 = 2;
  3.  
  4. fn save_num(s: &str)
  5. {
  6.     let ns: u64 = s.parse().unwrap();
  7.     unsafe {Y = X + ns};
  8. }
  9.  
  10. fn main()
  11. {
  12.     let z = "323";
  13.     save_num(z);
  14.     println!("{}", unsafe{Y});
  15.    
  16. }
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