Skip to content

Commit

Permalink
Rollup merge of rust-lang#70146 - GuillaumeGomez:cleanup-e0438, r=Dyl…
Browse files Browse the repository at this point in the history
…an-DPC

Clean up e0438 explanation

r? @Dylan-DPC
  • Loading branch information
JohnTitor committed Mar 20, 2020
2 parents d6ebf21 + 6f16118 commit 8965f63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/librustc_error_codes/error_codes/E0438.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Trait implementations can only implement associated constants that are
members of the trait in question. This error indicates that you
attempted to implement an associated constant whose name does not
match the name of any associated constant in the trait.
An associated constant whose name does not match any of the associated constants
in the trait was used when implementing the trait.

Erroneous code example:

Expand All @@ -13,6 +11,9 @@ impl Foo for i32 {
}
```

Trait implementations can only implement associated constants that are
members of the trait in question.

The solution to this problem is to remove the extraneous associated constant:

```
Expand Down

0 comments on commit 8965f63

Please sign in to comment.