Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup err codes #67547

Merged
merged 3 commits into from
Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/librustc_error_codes/error_codes/E0124.md
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
9 changes: 5 additions & 4 deletions src/librustc_error_codes/error_codes/E0128.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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> {
Expand Down