File tree 2 files changed +8
-6
lines changed
src/librustc_error_codes/error_codes
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
- You declared two fields of a struct with the same name. Erroneous code
2
- example:
1
+ A struct was declared with two fields having the same name.
2
+
3
+ Erroneous code example:
3
4
4
5
``` compile_fail,E0124
5
6
struct Foo {
Original file line number Diff line number Diff line change 1
- Type parameter defaults can only use parameters that occur before them.
1
+ A type parameter with default value is using forward declared identifier.
2
+
2
3
Erroneous code example:
3
4
4
5
``` compile_fail,E0128
@@ -7,11 +8,11 @@ struct Foo<T = U, U = ()> {
7
8
field2: U,
8
9
}
9
10
// error: type parameters with a default cannot use forward declared
10
- // identifiers
11
+ // identifiers
11
12
```
12
13
13
- Since type parameters are evaluated in-order, you may be able to fix this issue
14
- by doing:
14
+ Type parameter defaults can only use parameters that occur before them. Since
15
+ type parameters are evaluated in-order, this issue could be fixed by doing:
15
16
16
17
```
17
18
struct Foo<U = (), T = U> {
You can’t perform that action at this time.
0 commit comments