diff --git a/src/test/ui/issues/issue-43784-associated-type.stderr b/src/test/ui/issues/issue-43784-associated-type.stderr index 33692bd254e7..393b012f5f8a 100644 --- a/src/test/ui/issues/issue-43784-associated-type.stderr +++ b/src/test/ui/issues/issue-43784-associated-type.stderr @@ -5,13 +5,12 @@ LL | type Assoc: Partial; | ----- associated type defined here ... LL | impl 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 diff --git a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs index 265ccb3125ca..394512c57947 100644 --- a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs +++ b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs @@ -16,10 +16,10 @@ struct ParentWrapper(T); impl> Parent for ParentWrapper { //~^ ERROR the trait bound `::Assoc: Child` is not satisfied - //~| ERROR the trait bound `::Assoc: Child` is not satisfied type Ty = A; type Assoc = ChildWrapper; //~^ ERROR the trait bound `::Assoc: Child` is not satisfied + //~| ERROR the trait bound `::Assoc: Child` is not satisfied } fn main() {} diff --git a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr index bdea8ab97e5b..c6f2e5cda66a 100644 --- a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr +++ b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr @@ -9,25 +9,31 @@ LL | impl> Parent for ParentWrapper { | _| | | LL | | -LL | | LL | | type Ty = A; LL | | type Assoc = ChildWrapper; LL | | +LL | | LL | | } | |_^ the trait `Child` is not implemented for `::Assoc` error[E0277]: the trait bound `::Assoc: Child` 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; + | ----- associated type defined here +... LL | impl> Parent for ParentWrapper { - | ^^^^^^ - help: consider further restricting the associated type: `where ::Assoc: Child` - | | - | the trait `Child` is not implemented for `::Assoc` + | ------------------------------------------------------- help: consider further restricting the associated type: `where ::Assoc: Child` + | | + | in this `impl` item +... +LL | type Assoc = ChildWrapper; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Child` is not implemented for `::Assoc` | = note: required because of the requirements on the impl of `Child` for `ChildWrapper<::Assoc>` error[E0277]: the trait bound `::Assoc: Child` 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`