main.rs
1 fn main() { 2 let x = 5; 3 4 let x = x + 1; 5 6 { 7 let x = x * 2; 8 println!("The value of x in the inner scope is: {x}") 9 } 10 11 println!("The value of x is: {x}") 12 } 13
1 fn main() { 2 let x = 5; 3 4 let x = x + 1; 5 6 { 7 let x = x * 2; 8 println!("The value of x in the inner scope is: {x}") 9 } 10 11 println!("The value of x is: {x}") 12 } 13