mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #70103 - GuillaumeGomez:cleanup-e0437, r=Dylan-DPC
Clean up E0437 explanation r? @Dylan-DPC
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
Trait implementations can only implement associated types that are members of
|
||||
the trait in question. This error indicates that you attempted to implement
|
||||
an associated type whose name does not match the name of any associated type
|
||||
in the trait.
|
||||
An associated type whose name does not match any of the associated types
|
||||
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 types that are members of
|
||||
the trait in question.
|
||||
|
||||
The solution to this problem is to remove the extraneous associated type:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user