diff --git a/nostarch/chapter3.md b/nostarch/chapter3.md index 4f15f172c..ffb75fe09 100644 --- a/nostarch/chapter3.md +++ b/nostarch/chapter3.md @@ -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; diff --git a/src/variable-bindings.md b/src/variable-bindings.md index d3aacd640..b3f0de697 100644 --- a/src/variable-bindings.md +++ b/src/variable-bindings.md @@ -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;