|
| 1 | +error[E0599]: the method `check` exists for struct `Client<()>`, but its trait bounds were not satisfied |
| 2 | + --> $DIR/track-obligations.rs:83:16 |
| 3 | + | |
| 4 | +LL | struct ALayer<C>(C); |
| 5 | + | ---------------- |
| 6 | + | | |
| 7 | + | doesn't satisfy `<_ as Layer<()>>::Service = <ALayer<()> as ParticularServiceLayer<()>>::Service` |
| 8 | + | doesn't satisfy `ALayer<()>: ParticularServiceLayer<()>` |
| 9 | +... |
| 10 | +LL | struct Client<C>(C); |
| 11 | + | ---------------- method `check` not found for this struct |
| 12 | +... |
| 13 | +LL | Client(()).check(); |
| 14 | + | ^^^^^ method cannot be called on `Client<()>` due to unsatisfied trait bounds |
| 15 | + | |
| 16 | +note: trait bound `<ALayer<()> as Layer<()>>::Service = <ALayer<()> as ParticularServiceLayer<()>>::Service` was not satisfied |
| 17 | + --> $DIR/track-obligations.rs:35:14 |
| 18 | + | |
| 19 | +LL | pub trait ParticularServiceLayer<C>: |
| 20 | + | ---------------------- |
| 21 | +LL | Layer<C, Service = <Self as ParticularServiceLayer<C>>::Service> |
| 22 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here |
| 23 | +note: trait bound `ALayer<()>: ParticularServiceLayer<()>` was not satisfied |
| 24 | + --> $DIR/track-obligations.rs:71:16 |
| 25 | + | |
| 26 | +LL | impl<C> Client<C> |
| 27 | + | --------- |
| 28 | +LL | where |
| 29 | +LL | ALayer<C>: ParticularServiceLayer<C>, |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here |
| 31 | +note: the trait `ParticularServiceLayer` must be implemented |
| 32 | + --> $DIR/track-obligations.rs:34:1 |
| 33 | + | |
| 34 | +LL | / pub trait ParticularServiceLayer<C>: |
| 35 | +LL | | Layer<C, Service = <Self as ParticularServiceLayer<C>>::Service> |
| 36 | + | |____________________________________________________________________^ |
| 37 | + |
| 38 | +error[E0271]: type mismatch resolving `<AService as Service<Req>>::Response == Res` |
| 39 | + --> $DIR/track-obligations.rs:87:11 |
| 40 | + | |
| 41 | +LL | check(()); |
| 42 | + | ----- ^^ type mismatch resolving `<AService as Service<Req>>::Response == Res` |
| 43 | + | | |
| 44 | + | required by a bound introduced by this call |
| 45 | + | |
| 46 | +note: expected this to be `Res` |
| 47 | + --> $DIR/track-obligations.rs:60:21 |
| 48 | + | |
| 49 | +LL | type Response = bool; |
| 50 | + | ^^^^ |
| 51 | +note: required for `AService` to implement `ParticularService` |
| 52 | + --> $DIR/track-obligations.rs:22:9 |
| 53 | + | |
| 54 | +LL | impl<T> ParticularService for T |
| 55 | + | ^^^^^^^^^^^^^^^^^ ^ |
| 56 | +LL | where |
| 57 | +LL | T: Service<Req, Response = Res>, |
| 58 | + | -------------- unsatisfied trait bound introduced here |
| 59 | +note: required for `ALayer<_>` to implement `ParticularServiceLayer<_>` |
| 60 | + --> $DIR/track-obligations.rs:40:12 |
| 61 | + | |
| 62 | +LL | impl<T, C> ParticularServiceLayer<C> for T |
| 63 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^ |
| 64 | +... |
| 65 | +LL | T::Service: ParticularService, |
| 66 | + | ----------------- unsatisfied trait bound introduced here |
| 67 | +note: required by a bound in `check` |
| 68 | + --> $DIR/track-obligations.rs:76:36 |
| 69 | + | |
| 70 | +LL | fn check<C>(_: C) where ALayer<C>: ParticularServiceLayer<C> {} |
| 71 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check` |
| 72 | + |
| 73 | +error: aborting due to 2 previous errors |
| 74 | + |
| 75 | +Some errors have detailed explanations: E0271, E0599. |
| 76 | +For more information about an error, try `rustc --explain E0271`. |
0 commit comments