mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:24:32 -06:00
Merge pull request #61 from JIghtuse/master
variable-bindings: Specify example language
This commit is contained in:
@@ -538,7 +538,7 @@ know that the compiler will let us know if we try to modify it later. Let’s
|
||||
assume that after we calculate `12`, we don’t want to modify `x` again. If we
|
||||
had written this program in a mutable style, like this:
|
||||
|
||||
```
|
||||
```rust
|
||||
fn main() {
|
||||
let mut x = 5;
|
||||
x = x + 1;
|
||||
|
||||
@@ -527,7 +527,7 @@ know that the compiler will let us know if we try to modify it later. Let’s
|
||||
assume that after we calculate `12`, we don’t want to modify `x` again. If we
|
||||
had written this program in a mutable style, like this:
|
||||
|
||||
```
|
||||
```rust
|
||||
fn main() {
|
||||
let mut x = 5;
|
||||
x = x + 1;
|
||||
|
||||
Reference in New Issue
Block a user