File tree 1 file changed +8
-6
lines changed
src/librustc_error_codes/error_codes
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.
6
2
7
- For example:
3
+ Erroneous code example:
8
4
9
5
``` compile_fail,E0308
10
6
let x: i32 = "I am not a number!";
@@ -15,3 +11,9 @@ let x: i32 = "I am not a number!";
15
11
// |
16
12
// type `i32` assigned to variable `x`
17
13
```
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