File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1368,6 +1368,26 @@ struct Foo {
1368
1368
```
1369
1369
"## ,
1370
1370
1371
+ E0128 : r##"
1372
+ You declared a type parameter with a default which has the same identifier as
1373
+ the type parameter. Erroneous code example:
1374
+
1375
+ ```
1376
+ pub struct Foo<SomeType=SomeType>;
1377
+ // error: type parameters with a default cannot use forward declared
1378
+ // identifiers
1379
+ ```
1380
+
1381
+ Please verify you used the good type or change the type parameter identifier.
1382
+ Example:
1383
+
1384
+ ```
1385
+ pub struct Foo<T=SomeType> {
1386
+ value: T
1387
+ }
1388
+ ```
1389
+ "## ,
1390
+
1371
1391
E0131 : r##"
1372
1392
It is not possible to define `main` with type parameters, or even with function
1373
1393
parameters. When `main` is present, it must take no arguments and return `()`.
@@ -1978,7 +1998,6 @@ register_diagnostics! {
1978
1998
E0122 ,
1979
1999
E0123 ,
1980
2000
E0127 ,
1981
- E0128 ,
1982
2001
E0129 ,
1983
2002
E0130 ,
1984
2003
E0141 ,
You can’t perform that action at this time.
0 commit comments