diff --git a/exercises/01_variables/README.md b/exercises/01_variables/README.md index 5ba2efca..587882ee 100644 --- a/exercises/01_variables/README.md +++ b/exercises/01_variables/README.md @@ -3,6 +3,7 @@ In Rust, variables are immutable by default. When a variable is immutable, once a value is bound to a name, you can't change that value. You can make them mutable by adding `mut` in front of the variable name. +`variables5` is about that `mut` keyword, not shadowing. ## Further information diff --git a/exercises/01_variables/variables5.rs b/exercises/01_variables/variables5.rs index cf5620da..d4918f8b 100644 --- a/exercises/01_variables/variables5.rs +++ b/exercises/01_variables/variables5.rs @@ -2,7 +2,8 @@ fn main() { let number = "T-H-R-E-E"; // Don't change this line println!("Spell a number: {number}"); - // TODO: Fix the compiler error by changing the line below without renaming the variable. + // TODO: Fix the compiler error by making `number` mutable. + // This exercise is about mutability, not shadowing. number = 3; println!("Number plus two is: {}", number + 2); }