1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
fn main() { /* mutability */ let mut x = 5; println!("The variable of x is: {}", x); x = 6; println!("The variable of x is: {}", x); /* shadowing */ let x = 5; let x = x + 1; let x = x * 2; println!("The value of x is: {}", x); }