]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use9.full_tait.stderr
1 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/generic_duplicate_param_use9.rs:3:32
3 |
4 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
9
10 error: concrete type differs from previous defining opaque type use
11 --> $DIR/generic_duplicate_param_use9.rs:24:1
12 |
13 LL | fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, <A as Foo>::Bar)`, got `(A, B, i32)`
15 |
16 note: previous use here
17 --> $DIR/generic_duplicate_param_use9.rs:20:1
18 |
19 LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
23 --> $DIR/generic_duplicate_param_use9.rs:10:18
24 |
25 LL | type Two<A, B> = impl Debug;
26 | ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
27 |
28 = note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
29 help: consider restricting type parameter `A`
30 |
31 LL | type Two<A: Foo, B> = impl Debug;
32 | ^^^^^
33
34 error[E0277]: `A` doesn't implement `Debug`
35 --> $DIR/generic_duplicate_param_use9.rs:10:18
36 |
37 LL | type Two<A, B> = impl Debug;
38 | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
39 |
40 = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
41 help: consider restricting type parameter `A`
42 |
43 LL | type Two<A: std::fmt::Debug, B> = impl Debug;
44 | ^^^^^^^^^^^^^^^^^
45
46 error[E0277]: `B` doesn't implement `Debug`
47 --> $DIR/generic_duplicate_param_use9.rs:10:18
48 |
49 LL | type Two<A, B> = impl Debug;
50 | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
51 |
52 = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
53 help: consider restricting type parameter `B`
54 |
55 LL | type Two<A, B: std::fmt::Debug> = impl Debug;
56 | ^^^^^^^^^^^^^^^^^
57
58 error: aborting due to 4 previous errors; 1 warning emitted
59
60 For more information about this error, try `rustc --explain E0277`.