]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use3.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
10 fn one<T: Debug>(t: T) -> Two<T, T> {
11     //~^ ERROR non-defining opaque type use in defining scope
12     t
13 }
14
15 fn two<T: Debug, U>(t: T, _: U) -> Two<T, U> {
16     t
17 }
18
19 fn three<T, U: Debug>(_: T, u: U) -> Two<T, U> {
20     u
21 }