3 #![cfg_attr(full, feature(generic_const_exprs))]
4 #![cfg_attr(full, allow(incomplete_features))]
6 struct Foo<const N: usize, const M: usize = { N + 1 }>;
7 //[min]~^ ERROR generic parameters may not be used in const operations
9 struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
10 //[min]~^ ERROR generic parameters may not be used in const operations