]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.full.stderr
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / const-generics / generic_const_exprs / array-size-in-generic-struct-param.full.stderr
1 error: unconstrained generic constant
2   --> $DIR/array-size-in-generic-struct-param.rs:8:38
3    |
4 LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
5    |                                      ^^^^^^^^^^^^
6    |
7    = help: try adding a `where` bound using this expression: `where [(); 0 + N]:`
8
9 error: overly complex generic constant
10   --> $DIR/array-size-in-generic-struct-param.rs:19:15
11    |
12 LL |     arr: [u8; CFG.arr_size],
13    |               ^^^^^^^^^^^^ field access is not supported in generic constant
14    |
15    = help: consider moving this anonymous constant into a `const` function
16    = note: this operation may be supported in the future
17
18 error: aborting due to 2 previous errors
19