fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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