2020-08-26 05:22:55 -05:00
|
|
|
// [full] check-pass
|
|
|
|
// revisions: full min
|
2021-08-30 03:59:53 -05:00
|
|
|
#![cfg_attr(full, feature(adt_const_params))]
|
2020-08-26 05:22:55 -05:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2020-08-02 14:28:18 -05:00
|
|
|
|
|
|
|
struct Bar<T>(T);
|
|
|
|
|
|
|
|
impl<T> Bar<T> {
|
|
|
|
const fn value() -> usize {
|
|
|
|
42
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Foo<const N: [u8; Bar::<u32>::value()]>;
|
2023-01-14 12:32:17 -06:00
|
|
|
//[min]~^ ERROR `[u8; Bar::<u32>::value()]` is forbidden as the type of a const generic parameter
|
2020-08-02 14:28:18 -05:00
|
|
|
|
|
|
|
fn main() {}
|