]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr
Auto merge of #95454 - randomicon00:fix95444, 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:22:5
3    |
4 LL |     (t, u, 42)
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:18:5
9    |
10 LL |     (t, u, T::BAR)
11    |     ^^^^^^^^^^^^^^
12
13 error[E0277]: the trait bound `A: Foo` is not satisfied
14   --> $DIR/generic_duplicate_param_use9.rs:7:18
15    |
16 LL | type Two<A, B> = impl Debug;
17    |                  ^^^^^^^^^^ the trait `Foo` is not implemented for `A`
18    |
19 help: consider restricting type parameter `A`
20    |
21 LL | type Two<A: Foo, B> = impl Debug;
22    |           +++++
23
24 error[E0277]: `A` doesn't implement `Debug`
25   --> $DIR/generic_duplicate_param_use9.rs:7:18
26    |
27 LL | type Two<A, B> = impl Debug;
28    |                  ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
29    |
30    = note: required because of the requirements on the impl of `Debug` for `(A, B, _)`
31 help: consider restricting type parameter `A`
32    |
33 LL | type Two<A: std::fmt::Debug, B> = impl Debug;
34    |           +++++++++++++++++
35
36 error[E0277]: `B` doesn't implement `Debug`
37   --> $DIR/generic_duplicate_param_use9.rs:7:18
38    |
39 LL | type Two<A, B> = impl Debug;
40    |                  ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
41    |
42    = note: required because of the requirements on the impl of `Debug` for `(A, B, _)`
43 help: consider restricting type parameter `B`
44    |
45 LL | type Two<A, B: std::fmt::Debug> = impl Debug;
46    |              +++++++++++++++++
47
48 error: aborting due to 4 previous errors
49
50 For more information about this error, try `rustc --explain E0277`.