]>
Commit | Line | Data |
---|---|---|
1b1a35ee XL |
1 | // [full] check-pass |
2 | // revisions: full min | |
94222f64 | 3 | #![cfg_attr(full, feature(adt_const_params))] |
1b1a35ee | 4 | #![cfg_attr(full, allow(incomplete_features))] |
3dfed10e XL |
5 | |
6 | struct Bar<T>(T); | |
7 | ||
8 | impl<T> Bar<T> { | |
9 | const fn value() -> usize { | |
10 | 42 | |
11 | } | |
12 | } | |
13 | ||
14 | struct Foo<const N: [u8; Bar::<u32>::value()]>; | |
1b1a35ee | 15 | //[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter |
3dfed10e XL |
16 | |
17 | fn main() {} |