Skip to content

Commit d130e8d

Browse files
authored
Rollup merge of rust-lang#67547 - GuillaumeGomez:cleanup-err-codes, r=Dylan-DPC
Cleanup err codes r? @Dylan-DPC
2 parents 07effe1 + 256eec4 commit d130e8d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/librustc_error_codes/error_codes/E0124.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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:
34

45
```compile_fail,E0124
56
struct Foo {

src/librustc_error_codes/error_codes/E0128.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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+
23
Erroneous code example:
34

45
```compile_fail,E0128
@@ -7,11 +8,11 @@ struct Foo<T = U, U = ()> {
78
field2: U,
89
}
910
// error: type parameters with a default cannot use forward declared
10-
// identifiers
11+
// identifiers
1112
```
1213

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:
1516

1617
```
1718
struct Foo<U = (), T = U> {

0 commit comments

Comments
 (0)