Skip to content

Commit 8965f63

Browse files
authored
Rollup merge of #70146 - GuillaumeGomez:cleanup-e0438, r=Dylan-DPC
Clean up e0438 explanation r? @Dylan-DPC
2 parents d6ebf21 + 6f16118 commit 8965f63

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)