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

Clean up E0323, E0324, E0325 and E0326 explanations #69346

Merged
merged 2 commits into from
Feb 22, 2020
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
1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes/E0323.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
An associated const was implemented when another trait item was expected.

Erroneous code example:

```compile_fail,E0323
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_error_codes/error_codes/E0324.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
A method was implemented when another trait item was expected. Erroneous
code example:
A method was implemented when another trait item was expected.

Erroneous code example:

```compile_fail,E0324
struct Bar;
Expand Down
1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes/E0325.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
An associated type was implemented when another trait item was expected.

Erroneous code example:

```compile_fail,E0325
Expand Down
8 changes: 5 additions & 3 deletions src/librustc_error_codes/error_codes/E0326.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
The types of any associated constants in a trait implementation must match the
types in the trait definition. This error indicates that there was a mismatch.
An implementation of a trait doesn't match the type contraint.

Here's an example of this error:
Erroneous code example:

```compile_fail,E0326
trait Foo {
Expand All @@ -14,3 +13,6 @@ impl Foo for Bar {
const BAR: u32 = 5; // error, expected bool, found u32
}
```

The types of any associated constants in a trait implementation must match the
types in the trait definition.