1 #![feature(min_const_generics)]
3 pub const fn is_zst<T: ?Sized>() -> usize {
4 if std::mem::size_of::<T>() == 0 {
11 pub struct AtLeastByte<T: ?Sized> {
13 //~^ ERROR the size for values of type `T` cannot be known at compilation time
14 pad: [u8; is_zst::<T>()],
15 //~^ ERROR generic parameters must not be used inside of non-trivial constant values