]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/nested-type.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / 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     //[full]~^ ERROR cannot call non-const fn
17 }]>;
18
19 fn main() {}