We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54344c2 + c379d96 commit bca39a7Copy full SHA for bca39a7
doc/rust.md
@@ -3018,6 +3018,11 @@ Local variables are immutable unless declared with `let mut`. The
3018
declaration (so `let mut x, y` declares two mutable variables, `x` and
3019
`y`).
3020
3021
+Function parameters are immutable unless declared with `mut`. The
3022
+`mut` keyword applies only to the following parameter (so `|mut x, y|`
3023
+and `fn f(mut x: ~int, y: ~int)` declare one mutable variable `x` and
3024
+one immutable variable `y`).
3025
+
3026
Local variables are not initialized when allocated; the entire frame worth of
3027
local variables are allocated at once, on frame-entry, in an uninitialized
3028
state. Subsequent statements within a function may or may not initialize the
0 commit comments