]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr
6b985edae9e28a92feaad365ac68a7b9f81b54b4
[rust.git] / src / test / ui / suggestions / missing-assoc-type-bound-restriction.stderr
1 error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
2   --> $DIR/missing-assoc-type-bound-restriction.rs:17:19
3    |
4 LL | trait Parent {
5    |       ------
6 LL |     type Ty;
7 LL |     type Assoc: Child<Self::Ty>;
8    |                 --------------- required by this bound in `Parent`
9 ...
10 LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
11    |                   ^^^^^^                              - help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
12    |                   |
13    |                   the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
14
15 error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
16   --> $DIR/missing-assoc-type-bound-restriction.rs:20:5
17    |
18 LL |     type Assoc: Child<Self::Ty>;
19    |          ----- associated type defined here
20 ...
21 LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
22    | ------------------------------------------------------- help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
23    | |
24    | in this `impl` item
25 ...
26 LL |     type Assoc = ChildWrapper<T::Assoc>;
27    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
28    |
29    = note: required because of the requirements on the impl of `Child<A>` for `ChildWrapper<<T as Parent>::Assoc>`
30
31 error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
32   --> $DIR/missing-assoc-type-bound-restriction.rs:20:5
33    |
34 LL | trait Parent {
35    |       ------
36 LL |     type Ty;
37 LL |     type Assoc: Child<Self::Ty>;
38    |                 --------------- required by this bound in `Parent`
39 ...
40 LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
41    |                                                       - help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
42 ...
43 LL |     type Assoc = ChildWrapper<T::Assoc>;
44    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
45
46 error: aborting due to 3 previous errors
47
48 For more information about this error, try `rustc --explain E0277`.