Shadowing

Shadowing is the concept of re-using variable names. This can be done either in a new scope or in the same scope:

With shadowing, a new variable is created, which can have a different type, mutability and lifetime. Even when a variable is shadowed, it is dropped at the end of its scope: