mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-29 15:19:19 +00:00
10 lines
314 B
Markdown
10 lines
314 B
Markdown
# 變數
|
|
|
|
在 Rust 中,變數預設是不可變的。
|
|
一旦一個值被綁定到一個名稱,你就不能改變這個值。
|
|
你可以通過在變數名稱前面添加 `mut` 使其變為可變的。
|
|
|
|
## 更多資訊
|
|
|
|
- [變數和可變性](https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html)
|