3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(min, feature(min_const_generics))]
7 pub const fn is_zst<T: ?Sized>() -> usize {
8 if std::mem::size_of::<T>() == 0 {
9 //[full]~^ ERROR the size for values of type `T` cannot be known at compilation time
16 pub struct AtLeastByte<T: ?Sized> {
18 //~^ ERROR the size for values of type `T` cannot be known at compilation time
19 pad: [u8; is_zst::<T>()],
20 //[min]~^ ERROR generic parameters may not be used in const operations