Skip to content

Commit 6f16118

Browse files
committedMar 19, 2020
Clean up e0438 explanation
1 parent 59f4ba9 commit 6f16118

File tree

1 file changed

+5
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-4
lines changed
 

‎src/librustc_error_codes/error_codes/E0438.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
Trait implementations can only implement associated constants that are
2-
members of the trait in question. This error indicates that you
3-
attempted to implement an associated constant whose name does not
4-
match the name of any associated constant in the trait.
1+
An associated constant whose name does not match any of the associated constants
2+
in the trait was used when implementing the trait.
53

64
Erroneous code example:
75

@@ -13,6 +11,9 @@ impl Foo for i32 {
1311
}
1412
```
1513

14+
Trait implementations can only implement associated constants that are
15+
members of the trait in question.
16+
1617
The solution to this problem is to remove the extraneous associated constant:
1718

1819
```

0 commit comments

Comments
 (0)
Please sign in to comment.