File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -1118,6 +1118,36 @@ fn main() {
1118
1118
```
1119
1119
"## ,
1120
1120
1121
+ E0102 : r##"
1122
+ You hit this error because the compiler the compiler lacks information
1123
+ to determine a type for this variable. Erroneous code example:
1124
+
1125
+ ```
1126
+ fn main() {
1127
+ let x: &_; // error: cannot determine a type for this local variable
1128
+ }
1129
+ ```
1130
+
1131
+ You have two possibilities to solve this situation:
1132
+ * Give an explicit definition of the variable
1133
+ * Infer the variable
1134
+
1135
+ Examples:
1136
+
1137
+ ```
1138
+ fn some_func(x: u32) {
1139
+ // some code
1140
+ }
1141
+
1142
+ fn main() {
1143
+ let x = 0u32; // ok!
1144
+ // or:
1145
+ let x = 0;
1146
+ some_func(x);
1147
+ }
1148
+ ```
1149
+ "## ,
1150
+
1121
1151
E0106 : r##"
1122
1152
This error indicates that a lifetime is missing from a type. If it is an error
1123
1153
inside a function signature, the problem may be with failing to adhere to the
@@ -2303,7 +2333,6 @@ register_diagnostics! {
2303
2333
E0085 ,
2304
2334
E0086 ,
2305
2335
E0090 ,
2306
- E0102 ,
2307
2336
E0103 ,
2308
2337
E0104 ,
2309
2338
E0118 ,
You can’t perform that action at this time.
0 commit comments