Skip to content

Commit

Permalink
Clean up E0326 explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 21, 2020
1 parent c3303c7 commit 8f3fcec
Showing 1 changed file with 5 additions and 3 deletions.
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 8f3fcec

Please sign in to comment.