@@ -1023,7 +1023,7 @@ type Foo<A> = Box<A>; // ok!
1023
1023
"## ,
1024
1024
1025
1025
E0092 : r##"
1026
- You tried to call an undefined atomic operation function.
1026
+ You tried to declare an undefined atomic operation function.
1027
1027
Erroneous code example:
1028
1028
1029
1029
```
@@ -1037,7 +1037,7 @@ extern "rust-intrinsic" {
1037
1037
1038
1038
Please check you didn't make a mistake in the function's name. All intrinsic
1039
1039
functions are defined in librustc_trans/trans/intrinsic.rs and in
1040
- libcore/intrinsics.rs. Example:
1040
+ libcore/intrinsics.rs in the Rust source code . Example:
1041
1041
1042
1042
```
1043
1043
#![feature(intrinsics)]
@@ -1049,7 +1049,7 @@ extern "rust-intrinsic" {
1049
1049
"## ,
1050
1050
1051
1051
E0093 : r##"
1052
- You called an unknown intrinsic function. Erroneous code example:
1052
+ You declared an unknown intrinsic function. Erroneous code example:
1053
1053
1054
1054
```
1055
1055
#![feature(intrinsics)]
@@ -1067,7 +1067,7 @@ fn main() {
1067
1067
1068
1068
Please check you didn't make a mistake in the function's name. All intrinsic
1069
1069
functions are defined in librustc_trans/trans/intrinsic.rs and in
1070
- libcore/intrinsics.rs. Example:
1070
+ libcore/intrinsics.rs in the Rust source code . Example:
1071
1071
1072
1072
```
1073
1073
#![feature(intrinsics)]
@@ -1097,8 +1097,9 @@ extern "rust-intrinsic" {
1097
1097
}
1098
1098
```
1099
1099
1100
- Please check you give the right number of lifetime parameters and/or the
1101
- function definition. Example:
1100
+ Please check that you provided the right number of lifetime parameters
1101
+ and verify with the function declaration in the Rust source code.
1102
+ Example:
1102
1103
1103
1104
```
1104
1105
#![feature(intrinsics)]
@@ -1109,6 +1110,32 @@ extern "rust-intrinsic" {
1109
1110
```
1110
1111
"## ,
1111
1112
1113
+ E0101 : r##"
1114
+ You hit this error because the compiler the compiler lacks information
1115
+ to determine a type for this expression. Erroneous code example:
1116
+
1117
+ ```
1118
+ fn main() {
1119
+ let x = |_| {}; // error: cannot determine a type for this expression
1120
+ }
1121
+ ```
1122
+
1123
+ You have two possibilities to solve this situation:
1124
+ * Give an explicit definition of the expression
1125
+ * Infer the expression
1126
+
1127
+ Examples:
1128
+
1129
+ ```
1130
+ fn main() {
1131
+ let x = |_ : u32| {}; // ok!
1132
+ // or:
1133
+ let x = |_| {};
1134
+ x(0u32);
1135
+ }
1136
+ ```
1137
+ "## ,
1138
+
1112
1139
E0106 : r##"
1113
1140
This error indicates that a lifetime is missing from a type. If it is an error
1114
1141
inside a function signature, the problem may be with failing to adhere to the
@@ -1343,21 +1370,20 @@ Erroneous code example:
1343
1370
1344
1371
```
1345
1372
trait Trait {
1346
- fn t <'a,'b:'a>(x: &'a str, y: &'b str);
1373
+ fn bar <'a,'b:'a>(x: &'a str, y: &'b str);
1347
1374
}
1348
1375
1349
1376
struct Foo;
1350
1377
1351
1378
impl Trait for Foo {
1352
- fn t<'a,'b>(x: &'a str, y: &'b str) { // error: lifetime parameters
1353
- // or bounds on method `t`
1354
- // do not match the trait
1355
- // declaration
1379
+ fn bar<'a,'b>(x: &'a str, y: &'b str) {
1380
+ // error: lifetime parameters or bounds on method `bar`
1381
+ // do not match the trait declaration
1356
1382
}
1357
1383
}
1358
1384
```
1359
1385
1360
- The 'b lifetime constraints for `t` implementation does not match the
1386
+ The `'b` lifetime constraint for bar() implementation does not match the
1361
1387
trait declaration. Ensure lifetime declarations match exactly in both trait
1362
1388
declaration and implementation. Example:
1363
1389
@@ -1797,7 +1823,6 @@ register_diagnostics! {
1797
1823
E0085 ,
1798
1824
E0086 ,
1799
1825
E0090 ,
1800
- E0101 ,
1801
1826
E0102 ,
1802
1827
E0103 ,
1803
1828
E0104 ,
0 commit comments