#![feature(const_generics, const_evaluatable_checked)] #![allow(incomplete_features)] use std::mem::size_of; use std::marker::PhantomData; struct Foo(PhantomData); fn test() -> [u8; size_of::()] { [0; size_of::>()] //~^ ERROR unconstrained generic constant } fn main() { test::(); }