File tree 1 file changed +31
-3
lines changed
1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -1378,8 +1378,8 @@ pub struct Foo<SomeType=SomeType>;
1378
1378
// identifiers
1379
1379
```
1380
1380
1381
- Please verify you used the good type or change the type parameter identifier.
1382
- Example:
1381
+ Please verify that a name clash hasn't been accidentally introduced, and rename
1382
+ the type parameter if so. Example:
1383
1383
1384
1384
```
1385
1385
pub struct Foo<T=SomeType> {
@@ -1388,6 +1388,35 @@ pub struct Foo<T=SomeType> {
1388
1388
```
1389
1389
"## ,
1390
1390
1391
+ E0130 : r##"
1392
+ You declared a pattern as an argument in a foreign function declaration.
1393
+ Erroneous code example:
1394
+
1395
+ ```
1396
+ extern {
1397
+ fn foo((a, b): (u32, u32)); // error: patterns aren't allowed in foreign
1398
+ // function declarations
1399
+ }
1400
+ ```
1401
+
1402
+ Please replace the pattern argument with a regular one. Example:
1403
+
1404
+ ```
1405
+ struct SomeStruct {
1406
+ a: u32,
1407
+ b: u32,
1408
+ }
1409
+
1410
+ extern {
1411
+ fn foo(s: SomeStruct); // ok!
1412
+ }
1413
+ // or
1414
+ extern {
1415
+ fn foo(a: (u32, u32)); // ok!
1416
+ }
1417
+ ```
1418
+ "## ,
1419
+
1391
1420
E0131 : r##"
1392
1421
It is not possible to define `main` with type parameters, or even with function
1393
1422
parameters. When `main` is present, it must take no arguments and return `()`.
@@ -1999,7 +2028,6 @@ register_diagnostics! {
1999
2028
E0123 ,
2000
2029
E0127 ,
2001
2030
E0129 ,
2002
- E0130 ,
2003
2031
E0141 ,
2004
2032
E0159 ,
2005
2033
E0163 ,
You can’t perform that action at this time.
0 commit comments