@@ -10,12 +10,13 @@ note: previous use here
10
10
LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
12
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)`
14
14
--> $DIR/generic_duplicate_param_use9.rs:7:18
15
15
|
16
16
LL | 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`
18
18
|
19
+ = note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
19
20
help: consider restricting type parameter `A`
20
21
|
21
22
LL | type Two<A: Foo, B> = impl Debug;
@@ -27,7 +28,7 @@ error[E0277]: `A` doesn't implement `Debug`
27
28
LL | type Two<A, B> = impl Debug;
28
29
| ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
29
30
|
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 )`
31
32
help: consider restricting type parameter `A`
32
33
|
33
34
LL | type Two<A: std::fmt::Debug, B> = impl Debug;
@@ -39,7 +40,7 @@ error[E0277]: `B` doesn't implement `Debug`
39
40
LL | type Two<A, B> = impl Debug;
40
41
| ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
41
42
|
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 )`
43
44
help: consider restricting type parameter `B`
44
45
|
45
46
LL | type Two<A, B: std::fmt::Debug> = impl Debug;
0 commit comments