about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/issues/issue-43784-associated-type.stderr9
-rw-r--r--src/test/ui/suggestions/missing-assoc-type-bound-restriction.rs2
-rw-r--r--src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr18
3 files changed, 17 insertions, 12 deletions
diff --git a/src/test/ui/issues/issue-43784-associated-type.stderr b/src/test/ui/issues/issue-43784-associated-type.stderr
index 33692bd254e..393b012f5f8 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<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
 
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 265ccb3125c..394512c5794 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>(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() {}
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 bdea8ab97e5..c6f2e5cda66 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<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`