1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-07-03 00:46:57 +02:00
Files
.github
.vscode
exercises
clippy
conversions
enums
error_handling
functions
generics
hashmaps
if
intro
iterators
lifetimes
macros
modules
move_semantics
options
primitive_types
smart_pointers
strings
structs
tests
threads
traits
variables
README.md
variables1.rs
variables2.rs
variables3.rs
variables4.rs
variables5.rs
variables6.rs
vecs
README.md
quiz1.rs
quiz2.rs
quiz3.rs
src
tests
.all-contributorsrc
.editorconfig
.gitignore
.gitpod.yml
.replit
AUTHORS.md
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE
README.md
flake.lock
flake.nix
info.toml
install.ps1
install.sh
shell.nix
rustlings/exercises/variables/README.md

10 lines
347 B
Markdown
Raw Normal View History

# Variables
2019-01-23 21:02:06 +01:00
In Rust, variables are immutable by default.
When a variable is immutable, once a value is bound to a name, you can’t change that value.
You can make them mutable by adding mut in front of the variable name.
2019-01-23 21:02:06 +01:00
## Further information
2019-01-23 21:02:06 +01:00
2019-06-06 20:17:22 -07:00
- [Variables and Mutability](https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html)