]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use6.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_use6.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_use6.rs:18:1
12    |
13 LL | fn three<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
14    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)`
15    |
16 note: previous use here
17   --> $DIR/generic_duplicate_param_use6.rs:14:1
18    |
19 LL | fn two<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
20    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error[E0277]: `T` doesn't implement `Debug`
23   --> $DIR/generic_duplicate_param_use6.rs:11:18
24    |
25 LL | type Two<T, U> = impl Debug;
26    |                  ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
27    |
28    = note: required because of the requirements on the impl of `Debug` for `(T, T)`
29 help: consider restricting type parameter `T`
30    |
31 LL | type Two<T: std::fmt::Debug, U> = impl Debug;
32    |           +++++++++++++++++
33
34 error: aborting due to 2 previous errors; 1 warning emitted
35
36 For more information about this error, try `rustc --explain E0277`.