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