diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-03-20 17:02:12 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-20 17:02:12 +0900 |
| commit | 8965f63f84f95be77c480718a57bd3bfb7d97f69 (patch) | |
| tree | 853e4c8ed48cccd576333a41d693e07513cdfbe4 /src/librustc_error_codes/error_codes | |
| parent | d6ebf215b176487c946d7b5add2247d852992465 (diff) | |
| parent | 6f16118f281bbd3d9a152af905cd3a8702f35ded (diff) | |
| download | rust-8965f63f84f95be77c480718a57bd3bfb7d97f69.tar.gz rust-8965f63f84f95be77c480718a57bd3bfb7d97f69.zip | |
Rollup merge of #70146 - GuillaumeGomez:cleanup-e0438, r=Dylan-DPC
Clean up e0438 explanation r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0438.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0438.md b/src/librustc_error_codes/error_codes/E0438.md index cb141a5d24a..13723bc3009 100644 --- a/src/librustc_error_codes/error_codes/E0438.md +++ b/src/librustc_error_codes/error_codes/E0438.md @@ -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: @@ -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: ``` |
