mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 21:41:18 -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
|
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:
|
had written this program in a mutable style, like this:
|
||||||
|
|
||||||
```
|
```rust
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut x = 5;
|
let mut x = 5;
|
||||||
x = x + 1;
|
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
|
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:
|
had written this program in a mutable style, like this:
|
||||||
|
|
||||||
```
|
```rust
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut x = 5;
|
let mut x = 5;
|
||||||
x = x + 1;
|
x = x + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user