2020-08-09 01:19:57 -05:00
|
|
|
// revisions: full min
|
|
|
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2020-07-18 16:42:10 -05:00
|
|
|
|
|
|
|
struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
|
2020-08-09 01:19:57 -05:00
|
|
|
//[full]~^ ERROR constant values inside of type parameter defaults
|
2020-10-12 16:27:59 -05:00
|
|
|
//[min]~^^ ERROR generic parameters may not be used in const operations
|
2020-07-18 16:42:10 -05:00
|
|
|
|
2020-12-30 19:50:23 -06:00
|
|
|
// FIXME(const_generics_defaults): We still don't know how to deal with type defaults.
|
2020-07-18 16:42:10 -05:00
|
|
|
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() {}
|