diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-24 04:39:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-24 04:39:57 +0100 |
| commit | d130e8d550909413299bc9ac11490f98cb55340a (patch) | |
| tree | f826dd4af107e85e4b43a26b32d32d6254e4afc7 /src/librustc_error_codes/error_codes | |
| parent | 07effe18b01bfe559c6bcdc07ab7f004292bc8cc (diff) | |
| parent | 256eec4ae0653e35cdd39261a2b59d69c91b1a71 (diff) | |
| download | rust-d130e8d550909413299bc9ac11490f98cb55340a.tar.gz rust-d130e8d550909413299bc9ac11490f98cb55340a.zip | |
Rollup merge of #67547 - GuillaumeGomez:cleanup-err-codes, r=Dylan-DPC
Cleanup err codes r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0124.md | 5 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0128.md | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0124.md b/src/librustc_error_codes/error_codes/E0124.md index a7836526a7d..8af7cb819cf 100644 --- a/src/librustc_error_codes/error_codes/E0124.md +++ b/src/librustc_error_codes/error_codes/E0124.md @@ -1,5 +1,6 @@ -You declared two fields of a struct with the same name. Erroneous code -example: +A struct was declared with two fields having the same name. + +Erroneous code example: ```compile_fail,E0124 struct Foo { diff --git a/src/librustc_error_codes/error_codes/E0128.md b/src/librustc_error_codes/error_codes/E0128.md index d0a4b32f968..6f8dfe3a73b 100644 --- a/src/librustc_error_codes/error_codes/E0128.md +++ b/src/librustc_error_codes/error_codes/E0128.md @@ -1,4 +1,5 @@ -Type parameter defaults can only use parameters that occur before them. +A type parameter with default value is using forward declared identifier. + Erroneous code example: ```compile_fail,E0128 @@ -7,11 +8,11 @@ struct Foo<T = U, U = ()> { field2: U, } // error: type parameters with a default cannot use forward declared -// identifiers +// identifiers ``` -Since type parameters are evaluated in-order, you may be able to fix this issue -by doing: +Type parameter defaults can only use parameters that occur before them. Since +type parameters are evaluated in-order, this issue could be fixed by doing: ``` struct Foo<U = (), T = U> { |
