blob: 12ff5a2e713d8afdd487cee26534f31b66f4d0f3 [file] [log] [blame]
#![feature(const_generics)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
#![allow(incomplete_features)]
use std::fmt::Debug;
fn main() {}
// test that unused generic parameters are ok
type TwoTys<T, U> = impl Debug;
type TwoLifetimes<'a, 'b> = impl Debug;
type TwoConsts<const X: usize, const Y: usize> = impl Debug;
fn one_ty<T: Debug>(t: T) -> TwoTys<T, T> {
//~^ ERROR non-defining opaque type use in defining scope
t
}
fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> {
//~^ ERROR non-defining opaque type use in defining scope
t
}
fn one_const<const N: usize>(t: *mut [u8; N]) -> TwoConsts<N, N> {
//~^ ERROR non-defining opaque type use in defining scope
t
}