Created
September 23, 2023 14:40
-
-
Save shk2000v/56e125f4872c556ff51539c7a56318ac to your computer and use it in GitHub Desktop.
Rust variable binings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
// Variable bindings | |
let a = true; | |
let b: bool = true; | |
let (x,y) = (1,2); | |
let mut z = 5; // fixable | |
z = 6; | |
// Constants | |
const N: i32 = 5; // immutable | |
// Statics\ | |
Static N: i32 = 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment