]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs
1 #![feature(type_alias_impl_trait)]
7 // test that unused generic parameters are ok
8 type TwoTys
<T
, U
> = impl Debug
;
10 type TwoLifetimes
<'a
, 'b
> = impl Debug
;
12 type TwoConsts
<const X
: usize, const Y
: usize> = impl Debug
;
15 fn one_ty
<T
: Debug
>(t
: T
) -> TwoTys
<T
, T
> {
17 //~^ ERROR non-defining opaque type use in defining scope
20 fn one_lifetime
<'a
>(t
: &'a
u32) -> TwoLifetimes
<'a
, 'a
> {
22 //~^ ERROR non-defining opaque type use in defining scope
25 fn one_const
<const N
: usize>(t
: *mut [u8; N
]) -> TwoConsts
<N
, N
> {
27 //~^ ERROR non-defining opaque type use in defining scope