2020-08-26 18:44:00 +08:00
|
|
|
// [full] check-pass
|
|
|
|
// revisions: full min
|
2021-08-30 10:59:53 +02:00
|
|
|
#![cfg_attr(full, feature(adt_const_params))]
|
2020-08-26 18:44:00 +08:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2020-04-11 18:05:02 +02:00
|
|
|
|
|
|
|
struct Const<const V: [usize; 0]> {}
|
2020-08-26 18:44:00 +08:00
|
|
|
//[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter
|
2020-04-11 18:05:02 +02:00
|
|
|
type MyConst = Const<{ [] }>;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _x = Const::<{ [] }> {};
|
|
|
|
let _y = MyConst {};
|
|
|
|
}
|