]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use5.rs
1 #![feature(type_alias_impl_trait)]
2
3 use std::fmt::Debug;
4
5 fn main() {}
6
7 // test that unused generic parameters are ok
8 type Two<T, U> = impl Debug;
9 //~^ ERROR `T` doesn't implement `Debug`
10 //~| ERROR `U` doesn't implement `Debug`
11
12 fn two<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
13     (t, u)
14 }
15
16 fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
17     //~^ concrete type differs from previous
18     (u, t)
19 }