]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use3.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5
6 use std::fmt::Debug;
7
8 fn main() {}
9
10 // test that unused generic parameters are ok
11 type Two<T, U> = impl Debug;
12
13 fn one<T: Debug>(t: T) -> Two<T, T> {
14 //~^ ERROR non-defining opaque type use in defining scope
15 t
16 }
17
18 fn two<T: Debug, U>(t: T, _: U) -> Two<T, U> {
19 t
20 }
21
22 fn three<T, U: Debug>(_: T, u: U) -> Two<T, U> {
23 u
24 }