]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0437.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0437.md
1 An associated type whose name does not match any of the associated types
2 in the trait was used when implementing the trait.
3
4 Erroneous code example:
5
6 ```compile_fail,E0437
7 trait Foo {}
8
9 impl Foo for i32 {
10 type Bar = bool;
11 }
12 ```
13
14 Trait implementations can only implement associated types that are members of
15 the trait in question.
16
17 The solution to this problem is to remove the extraneous associated type:
18
19 ```
20 trait Foo {}
21
22 impl Foo for i32 {}
23 ```