]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs
Check opaque types satisfy their bounds
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use7.rs
1 // check-pass
2 #![feature(type_alias_impl_trait)]
3
4 use std::fmt::Debug;
5
6 fn main() {}
7
8 type Two<A: Debug, B> = impl Debug;
9
10 fn two<T: Debug + Copy, U>(t: T, u: U) -> Two<T, U> {
11     (t, t)
12 }
13
14 fn three<T: Debug, U>(t: T, t2: T, u: U) -> Two<T, U> {
15     (t, t2)
16 }
17
18 fn four<T: Debug, U, V>(t: T, t2: T, u: U, v: V) -> Two<T, U> {
19     (t, t2)
20 }
21
22 fn five<X, Y: Debug>(x: X, y: Y, y2: Y) -> Two<Y, X> {
23     (y, y2)
24 }