]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use9.stderr
1 error: concrete type differs from previous defining opaque type use
2   --> $DIR/generic_duplicate_param_use9.rs:21:1
3    |
4 LL | fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, <A as Foo>::Bar)`, got `(A, B, i32)`
6    |
7 note: previous use here
8   --> $DIR/generic_duplicate_param_use9.rs:17:1
9    |
10 LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
14   --> $DIR/generic_duplicate_param_use9.rs:7:18
15    |
16 LL | type Two<A, B> = impl Debug;
17    |                  ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
18    |
19    = note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
20 help: consider restricting type parameter `A`
21    |
22 LL | type Two<A: Foo, B> = impl Debug;
23    |           +++++
24
25 error[E0277]: `A` doesn't implement `Debug`
26   --> $DIR/generic_duplicate_param_use9.rs:7:18
27    |
28 LL | type Two<A, B> = impl Debug;
29    |                  ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
30    |
31    = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
32 help: consider restricting type parameter `A`
33    |
34 LL | type Two<A: std::fmt::Debug, B> = impl Debug;
35    |           +++++++++++++++++
36
37 error[E0277]: `B` doesn't implement `Debug`
38   --> $DIR/generic_duplicate_param_use9.rs:7:18
39    |
40 LL | type Two<A, B> = impl Debug;
41    |                  ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
42    |
43    = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
44 help: consider restricting type parameter `B`
45    |
46 LL | type Two<A, B: std::fmt::Debug> = impl Debug;
47    |              +++++++++++++++++
48
49 error: aborting due to 4 previous errors
50
51 For more information about this error, try `rustc --explain E0277`.