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