SHARE
TWEET

Untitled

a guest Oct 21st, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const fn double(x: i32) -> i32 {
  2.     x * 2
  3. }
  4.  
  5. const FIVE: i32 = 5;
  6. const TEN: i32 = double(FIVE);
  7.  
  8. fn main() {
  9.     assert_eq!(5, FIVE);
  10.     assert_eq!(10, TEN);
  11. }
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