]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use6.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
11 fn two<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
12     (t, t)
13 }
14
15 fn three<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
16     (u, t)
17     //~^ ERROR concrete type differs from previous
18 }