]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0191.md
Rollup merge of #72674 - Mark-Simulacrum:clippy-always-test-pass, r=oli-obk
[rust.git] / src / librustc_error_codes / error_codes / E0191.md
1 An associated type wasn't specified for a trait object.
2
3 Erroneous code example:
4
5 ```compile_fail,E0191
6 trait Trait {
7     type Bar;
8 }
9
10 type Foo = Trait; // error: the value of the associated type `Bar` (from
11                   //        the trait `Trait`) must be specified
12 ```
13
14 Trait objects need to have all associated types specified. Please verify that
15 all associated types of the trait were specified and the correct trait was used.
16 Example:
17
18 ```
19 trait Trait {
20     type Bar;
21 }
22
23 type Foo = Trait<Bar=i32>; // ok!
24 ```