]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential_types/generic_duplicate_param_use2.rs
Restrict concrete types to equivalent types
[rust.git] / src / test / ui / existential_types / generic_duplicate_param_use2.rs
1 #![feature(existential_type)]
2
3 use std::fmt::Debug;
4
5 fn main() {}
6
7 // test that unused generic parameters are ok
8 existential type Two<T, U>: Debug;
9
10 fn one<T: Debug>(t: T) -> Two<T, T> {
11 //~^ defining existential type use restricts existential type
12     t
13 }
14
15 fn two<T: Debug, U>(t: T, _: U) -> Two<T, U> {
16     t
17 }