1 #![feature(const_generics)]
2 #![feature(type_alias_impl_trait)]
3 #![allow(incomplete_features)]
9 // test that unused generic parameters are ok
10 type TwoTys<T, U> = impl Debug;
11 type TwoLifetimes<'a, 'b> = impl Debug;
12 type TwoConsts<const X: usize, const Y: usize> = impl Debug;
14 fn one_ty<T: Debug>(t: T) -> TwoTys<T, T> {
15 //~^ ERROR non-defining opaque type use in defining scope
19 fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> {
20 //~^ ERROR non-defining opaque type use in defining scope
24 fn one_const<const N: usize>(t: *mut [u8; N]) -> TwoConsts<N, N> {
25 //~^ ERROR non-defining opaque type use in defining scope