mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 20:49:41 +00:00
Added proposed change to variables shadowing problem 6
This commit is contained in:
@ -83,8 +83,7 @@ fn main() {
|
|||||||
let mut x: i32 = 1;
|
let mut x: i32 = 1;
|
||||||
x = 7;
|
x = 7;
|
||||||
// Shadowing and re-binding
|
// Shadowing and re-binding
|
||||||
let mut x = x;
|
let x = x;
|
||||||
x += 3;
|
|
||||||
|
|
||||||
|
|
||||||
let y = 4;
|
let y = 4;
|
||||||
|
Reference in New Issue
Block a user