You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-12 09:10:40 +02:00
225 B
225 B
Variables
Rust provides type safety via static typing. Variable bindings are immutable by default:
fn main() {
let x: i32 = 10;
println!("x: {x}");
// x = 20;
// println!("x: {x}");
}