Mettle

E0005Scope error

Reported by the compiler as an error or warning.

mettle explain E0005

A name was used outside the region where it is visible. Variables live from their declaration to the end of the enclosing block.

Fix: declare the variable in a scope that encloses every use, or move the use into the variable's block.

Related