#![feature(generic_const_exprs)] #![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 //~| ERROR mismatched types } fn main() { test::(); }