]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr
Point at `impl` blocks when they introduce unmet obligations
[rust.git] / src / test / ui / generic-associated-types / method-unsatified-assoc-type-predicate.stderr
index 8af9fbed872e15e72da14bb01cd84696eaed08ed..3eeb9540e73513440ba56bd48ec36ee0516a7708 100644 (file)
@@ -1,5 +1,5 @@
 error[E0599]: the method `f` exists for struct `S`, but its trait bounds were not satisfied
-  --> $DIR/method-unsatified-assoc-type-predicate.rs:26:7
+  --> $DIR/method-unsatified-assoc-type-predicate.rs:27:7
    |
 LL | struct S;
    | ---------
@@ -11,9 +11,12 @@ LL | struct S;
 LL |     a.f();
    |       ^ method cannot be called on `S` due to unsatisfied trait bounds
    |
-   = note: the following trait bounds were not satisfied:
-           `<S as X>::Y<i32> = i32`
-           which is required by `S: M`
+note: the following trait bounds were not satisfied because of the requirements of the implementation of `M` for `_`:
+      `<S as X>::Y<i32> = i32`
+  --> $DIR/method-unsatified-assoc-type-predicate.rs:14:26
+   |
+LL | impl<T: X<Y<i32> = i32>> M for T {}
+   |                          ^     ^
 
 error: aborting due to previous error