Having a way of differentiating binding declaration and variable affectation is useful. For example, it prevents code from compiling if you make a typo when assigning to an existing variable:
let mut foo = 42;
fob = 3; // typo here: won't compile
The syntactic way of doing this that was chosen by rust is
let. Different languages choose different solutions, such as using different assignment and binding operators (e.g.
= for assignment or
:= for binding), or requiring typing the type of a variable when introducing a binding (like in C, Java or C++ for instance).
In the case of a function or struct, giving names to variable already implicitly creates a binding, as no assignment to an existing binding is possible in this context. Hence, the
let would not add more information. As a result, it is not used.