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