Skip to content

Glossary: Rust Basics

Shadowing

Also written: shadows, shadow

Declaring a new variable with the same name as an earlier one, which hides the old one from then on, as in `let total = total + 8;`.

Where the book teaches it

Related terms

VariableImmutable