2020-07-18 16:42:10 -05:00
|
|
|
#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete
|
|
|
|
|
|
|
|
struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
|
|
|
|
//~^ ERROR constant values inside of type parameter defaults
|
|
|
|
|
|
|
|
// FIXME(const_generics:defaults): We still don't know how to we deal with type defaults.
|
|
|
|
struct Bar<T = [u8; N], const N: usize>(T);
|
|
|
|
//~^ ERROR constant values inside of type parameter defaults
|
2020-07-27 09:41:27 -05:00
|
|
|
//~| ERROR type parameters with a default
|
2020-07-18 16:42:10 -05:00
|
|
|
|
|
|
|
fn main() {}
|