You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-14 01:54:50 +02:00
Publish Comprehensive Rust 🦀
This commit is contained in:
13
src/basic-syntax/variables.md
Normal file
13
src/basic-syntax/variables.md
Normal file
@ -0,0 +1,13 @@
|
||||
# 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}");
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user