error[E0599]: the method `check` exists for struct `Client<()>`, but its trait bounds were not satisfied --> $DIR/track-obligations.rs:83:16 | LL | struct ALayer(C); | ---------------- doesn't satisfy `ALayer<()>: ParticularServiceLayer<()>` ... LL | struct AService; | --------------- doesn't satisfy `>::Response = Res` ... LL | struct Client(C); | ---------------- method `check` not found for this struct ... LL | Client(()).check(); | ^^^^^ method cannot be called on `Client<()>` due to unsatisfied trait bounds | note: trait bound `>::Response = Res` was not satisfied --> $DIR/track-obligations.rs:24:21 | LL | impl ParticularService for T | ----------------- - LL | where LL | T: Service, | ^^^^^^^^^^^^^^ unsatisfied trait bound introduced here error[E0271]: type mismatch resolving `>::Response == Res` --> $DIR/track-obligations.rs:87:11 | LL | check(()); | ----- ^^ type mismatch resolving `>::Response == Res` | | | required by a bound introduced by this call | note: expected this to be `Res` --> $DIR/track-obligations.rs:60:21 | LL | type Response = bool; | ^^^^ note: required for `AService` to implement `ParticularService` --> $DIR/track-obligations.rs:22:9 | LL | impl ParticularService for T | ^^^^^^^^^^^^^^^^^ ^ LL | where LL | T: Service, | -------------- unsatisfied trait bound introduced here note: required for `ALayer<_>` to implement `ParticularServiceLayer<_>` --> $DIR/track-obligations.rs:40:12 | LL | impl ParticularServiceLayer for T | ^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ... LL | T::Service: ParticularService, | ----------------- unsatisfied trait bound introduced here note: required by a bound in `check` --> $DIR/track-obligations.rs:76:36 | LL | fn check(_: C) where ALayer: ParticularServiceLayer {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 2 previous errors Some errors have detailed explanations: E0271, E0599. For more information about an error, try `rustc --explain E0271`.