Skip to content

Instantly share code, notes, and snippets.

@shk2000v
Created September 23, 2023 14:40
Show Gist options
  • Save shk2000v/56e125f4872c556ff51539c7a56318ac to your computer and use it in GitHub Desktop.
Save shk2000v/56e125f4872c556ff51539c7a56318ac to your computer and use it in GitHub Desktop.
Rust variable binings
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