1 Expected type did not match the received type.
3 Erroneous code example:
6 let x: i32 = "I am not a number!";
7 // ~~~ ~~~~~~~~~~~~~~~~~~~~
9 // | initializing expression;
10 // | compiler infers type `&str`
12 // type `i32` assigned to variable `x`
15 This error occurs when the compiler was unable to infer the concrete type of a
16 variable. It can occur for several cases, the most common of which is a
17 mismatch in the expected type that the compiler inferred for a variable's
18 initializing expression, and the actual type explicitly assigned to the