blob: 742340f430e2b74f8f4714921a04e5610d7d7fee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
struct Foo<const N: usize>;
impl<const N: usize> Foo<N> {
fn value() -> usize {
N
}
}
Foo::<17>::value()
//[full]~^ ERROR cannot call non-const fn
}]>;
fn main() {}
|