@@ -10,12 +10,13 @@ note: previous use here
1010LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
13- error[E0277]: the trait bound `A: Foo` is not satisfied
13+ error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
1414 --> $DIR/generic_duplicate_param_use9.rs:7:18
1515 |
1616LL | type Two<A, B> = impl Debug;
17- | ^^^^^^^^^^ the trait `Foo` is not implemented for `A`
17+ | ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
1818 |
19+ = note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
1920help: consider restricting type parameter `A`
2021 |
2122LL | type Two<A: Foo, B> = impl Debug;
@@ -27,7 +28,7 @@ error[E0277]: `A` doesn't implement `Debug`
2728LL | type Two<A, B> = impl Debug;
2829 | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
2930 |
30- = note: required because of the requirements on the impl of `Debug` for `(A, B, _ )`
31+ = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar )`
3132help: consider restricting type parameter `A`
3233 |
3334LL | type Two<A: std::fmt::Debug, B> = impl Debug;
@@ -39,7 +40,7 @@ error[E0277]: `B` doesn't implement `Debug`
3940LL | type Two<A, B> = impl Debug;
4041 | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
4142 |
42- = note: required because of the requirements on the impl of `Debug` for `(A, B, _ )`
43+ = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar )`
4344help: consider restricting type parameter `B`
4445 |
4546LL | type Two<A, B: std::fmt::Debug> = impl Debug;
0 commit comments