Shadowing lets you declare a new variable with the exact same name using let again. Unlike mut, shadowing even lets you change the data type (for example, turning a string input "42" into an integer 42) while keeping the final variable immutable!
ADVERTISEMENT