]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/nested-type.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / test / ui / const-generics / nested-type.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 struct Foo<const N: [u8; {
8 //~^ ERROR cycle detected
9 //~| ERROR cycle detected
10 //[min]~| ERROR using `[u8; _]` as const generic
11     struct Foo<const N: usize>;
12
13     impl<const N: usize> Foo<N> {
14         fn value() -> usize {
15             N
16         }
17     }
18
19     Foo::<17>::value()
20 }]>;
21
22 fn main() {}