]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/nested-type.rs
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / const-generics / nested-type.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
5
6 struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
7     struct Foo<const N: usize>;
8
9     impl<const N: usize> Foo<N> {
10         fn value() -> usize {
11             N
12         }
13     }
14
15     Foo::<17>::value()
16     //~^ ERROR calls in constants are limited to constant functions
17 }]>;
18
19 fn main() {}