Closed 0xmahdirostami closed 11 months ago
This example for type declarations for the let p1 with function pointers, not for let x
let p1
let x
// 01. Without type declarations. let p1 = plus_one; // 02. With type declarations. let p1: fn(i32) -> i32 = plus_one;
fn plus_one(a: i32) -> i32 { a + 1 }
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4a0e5a13d96ef71e49dc0dc3d812ae90
This example for type declarations for the
let p1
with function pointers, not forlet x
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4a0e5a13d96ef71e49dc0dc3d812ae90