Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 22, 2019
1 parent 669a403 commit 580a93e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
9 changes: 4 additions & 5 deletions src/test/ui/issues/issue-43784-associated-type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 580a93e

Please sign in to comment.