1 #![feature(const_generics)]
2 // revisions: min_tait full_tait
3 #![feature(min_type_alias_impl_trait)]
4 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5 #![allow(incomplete_features)]
11 // test that unused generic parameters are ok
12 type TwoTys<T, U> = impl Debug;
13 type TwoLifetimes<'a, 'b> = impl Debug;
14 type TwoConsts<const X: usize, const Y: usize> = impl Debug;
16 fn one_ty<T: Debug>(t: T) -> TwoTys<T, T> {
17 //~^ ERROR non-defining opaque type use in defining scope
21 fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> {
22 //~^ ERROR non-defining opaque type use in defining scope
26 fn one_const<const N: usize>(t: *mut [u8; N]) -> TwoConsts<N, N> {
27 //~^ ERROR non-defining opaque type use in defining scope