Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fn double(x: i32) -> i32 {
- x * 2
- }
- const FIVE: i32 = 5;
- const TEN: i32 = double(FIVE);
- fn main() {
- assert_eq!(5, FIVE);
- assert_eq!(10, TEN);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement