File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1- This error occurs when the compiler was unable to infer the concrete type of a
2- variable. It can occur for several cases, the most common of which is a
3- mismatch in the expected type that the compiler inferred for a variable's
4- initializing expression, and the actual type explicitly assigned to the
5- variable.
1+ Expected type did not match the received type.
62
7- For example:
3+ Erroneous code example:
84
95``` compile_fail,E0308
106let x: i32 = "I am not a number!";
@@ -15,3 +11,9 @@ let x: i32 = "I am not a number!";
1511// |
1612// type `i32` assigned to variable `x`
1713```
14+
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
19+ variable.
You can’t perform that action at this time.
0 commit comments