Fix rebase
This commit is contained in:
parent
669a4035ef
commit
580a93e2b6
3 changed files with 17 additions and 12 deletions
|
|
@ -5,13 +5,12 @@ LL | type Assoc: Partial<Self>;
|
|||
| ----- associated type defined here
|
||||
...
|
||||
LL | impl<T> Complete for T {
|
||||
| ---------------------- in this `impl` item
|
||||
| |
|
||||
| help: consider restricting this bound: `T: std::marker::Copy`
|
||||
| ----------------------
|
||||
| | |
|
||||
| | help: consider restricting this bound: `T: std::marker::Copy`
|
||||
| in this `impl` item
|
||||
LL | type Assoc = T;
|
||||
| ^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
|
||||
|
|
||||
= help: consider adding a `where T: std::marker::Copy` bound
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ struct ParentWrapper<T>(T);
|
|||
|
||||
impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
|
||||
//~^ ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
//~| ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
type Ty = A;
|
||||
type Assoc = ChildWrapper<T::Assoc>;
|
||||
//~^ ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
//~| ERROR the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -9,25 +9,31 @@ LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
|
|||
| _|
|
||||
| |
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | type Ty = A;
|
||||
LL | | type Assoc = ChildWrapper<T::Assoc>;
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
|
||||
|
||||
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
--> $DIR/missing-assoc-type-bound-restriction.rs:17:28
|
||||
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5
|
||||
|
|
||||
LL | type Assoc: Child<Self::Ty>;
|
||||
| ----- associated type defined here
|
||||
...
|
||||
LL | impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
|
||||
| ^^^^^^ - help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
|
||||
| |
|
||||
| the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
|
||||
| ------------------------------------------------------- help: consider further restricting the associated type: `where <T as Parent>::Assoc: Child<A>`
|
||||
| |
|
||||
| in this `impl` item
|
||||
...
|
||||
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>`
|
||||
|
||||
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
|
||||
--> $DIR/missing-assoc-type-bound-restriction.rs:21:5
|
||||
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5
|
||||
|
|
||||
LL | trait Parent {
|
||||
| ------------ required by `Parent`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue