]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/nested-type.min.stderr
Rollup merge of #106917 - compiler-errors:const-closure-foreign, r=tmiasko
[rust.git] / tests / ui / const-generics / nested-type.min.stderr
1 error: `[u8; {
2            struct Foo<const N: usize>;
3        
4            impl<const N: usize> Foo<N> {
5                fn value() -> usize {
6                    N
7                }
8            }
9        
10            Foo::<17>::value()
11        }]` is forbidden as the type of a const generic parameter
12   --> $DIR/nested-type.rs:6:21
13    |
14 LL |   struct Foo<const N: [u8; {
15    |  _____________________^
16 LL | |     struct Foo<const N: usize>;
17 LL | |
18 LL | |     impl<const N: usize> Foo<N> {
19 ...  |
20 LL | |
21 LL | | }]>;
22    | |__^
23    |
24    = note: the only supported types are integers, `bool` and `char`
25    = help: more complex types are supported with `#![feature(adt_const_params)]`
26
27 error: aborting due to previous error
28