|
1 | 1 | error[E0599]: the function or associated item `schema` exists for struct `Foo<Bar>`, but its trait bounds were not satisfied |
2 | | - --> tests/fail/not_openapitype_generics.rs:11:14 |
3 | | - | |
4 | | -4 | struct Foo<T> { |
5 | | - | ------------- |
6 | | - | | |
7 | | - | function or associated item `schema` not found for this |
8 | | - | doesn't satisfy `Foo<Bar>: OpenapiType` |
| 2 | + --> tests/fail/not_openapitype_generics.rs:11:14 |
| 3 | + | |
| 4 | +4 | struct Foo<T> { |
| 5 | + | ------------- |
| 6 | + | | |
| 7 | + | function or associated item `schema` not found for this |
| 8 | + | doesn't satisfy `Foo<Bar>: OpenapiType` |
9 | 9 | ... |
10 | | -8 | struct Bar; |
11 | | - | ----------- doesn't satisfy `Bar: OpenapiType` |
| 10 | +8 | struct Bar; |
| 11 | + | ----------- doesn't satisfy `Bar: OpenapiType` |
12 | 12 | ... |
13 | | -11 | <Foo<Bar>>::schema(); |
14 | | - | ^^^^^^ function or associated item cannot be called on `Foo<Bar>` due to unsatisfied trait bounds |
15 | | - | |
16 | | - = note: the following trait bounds were not satisfied: |
17 | | - `Bar: OpenapiType` |
18 | | - which is required by `Foo<Bar>: OpenapiType` |
19 | | - `Foo<Bar>: OpenapiType` |
20 | | - which is required by `&Foo<Bar>: OpenapiType` |
21 | | - = help: items from traits can only be used if the trait is implemented and in scope |
22 | | - = note: the following trait defines an item `schema`, perhaps you need to implement it: |
23 | | - candidate #1: `OpenapiType` |
| 13 | +11 | <Foo<Bar>>::schema(); |
| 14 | + | ^^^^^^ function or associated item cannot be called on `Foo<Bar>` due to unsatisfied trait bounds |
| 15 | + | |
| 16 | + = note: the following trait bounds were not satisfied: |
| 17 | + `Bar: OpenapiType` |
| 18 | + which is required by `Foo<Bar>: OpenapiType` |
| 19 | + `Foo<Bar>: OpenapiType` |
| 20 | + which is required by `&Foo<Bar>: OpenapiType` |
| 21 | +note: the following trait must be implemented |
| 22 | + --> src/lib.rs |
| 23 | + | |
| 24 | + | / pub trait OpenapiType { |
| 25 | + | | fn schema() -> OpenapiSchema; |
| 26 | + | | } |
| 27 | + | |_^ |
| 28 | + = help: items from traits can only be used if the trait is implemented and in scope |
| 29 | + = note: the following trait defines an item `schema`, perhaps you need to implement it: |
| 30 | + candidate #1: `OpenapiType` |
0 commit comments