Skip to content

Commit

Permalink
Rollup merge of #69346 - GuillaumeGomez:clean-up-e032x-explanations, …
Browse files Browse the repository at this point in the history
…r=Dylan-DPC

Clean up E0323, E0324, E0325 and E0326 explanations

r? @Dylan-DPC
  • Loading branch information
Dylan-DPC authored Feb 22, 2020
2 parents 3d9b68a + 8f3fcec commit 1cb9fb5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
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.

0 comments on commit 1cb9fb5

Please sign in to comment.