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 is unable to infer the concrete type of a
16 variable. It can occur in several cases, the most common being a mismatch
17 between two types: the type the author explicitly assigned, and the type the