blob: a8ea2147961839c9fcda2bccd00c66660a0e6210 [file] [log] [blame]
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
--> $DIR/missing-assoc-type-bound-restriction.rs:17:19
|
LL | trait Parent {
| ------ required by a bound in this
LL | type Ty;
LL | type Assoc: Child<Self::Ty>;
| --------------- required by this bound in `Parent`
...
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
| ^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
|
help: consider further restricting the associated type
|
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> where <T as Parent>::Assoc: Child<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
--> $DIR/missing-assoc-type-bound-restriction.rs:20:18
|
LL | trait Parent {
| ------ required by a bound in this
LL | type Ty;
LL | type Assoc: Child<Self::Ty>;
| --------------- required by this bound in `Parent`
...
LL | type Assoc = ChildWrapper<T::Assoc>;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
|
= note: required because of the requirements on the impl of `Child<A>` for `ChildWrapper<<T as Parent>::Assoc>`
help: consider further restricting the associated type
|
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> where <T as Parent>::Assoc: Child<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5
|
LL | trait Parent {
| ------ required by a bound in this
LL | type Ty;
LL | type Assoc: Child<Self::Ty>;
| --------------- required by this bound in `Parent`
...
LL | type Assoc = ChildWrapper<T::Assoc>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
|
help: consider further restricting the associated type
|
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> where <T as Parent>::Assoc: Child<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.