summary refs log tree commit diff
path: root/src/test/ui/const-generics/array-size-in-generic-struct-param.min.stderr
blob: 809514e8a1c9da2ecdebddeb3cbf309a61eb098a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/array-size-in-generic-struct-param.rs:9:48
   |
LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
   |                                                ^ non-trivial anonymous constants must not depend on the parameter `N`
   |
   = help: it is currently only allowed to use either `N` or `{ N }` as generic constants

error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/array-size-in-generic-struct-param.rs:20:15
   |
LL |     arr: [u8; CFG.arr_size],
   |               ^^^ non-trivial anonymous constants must not depend on the parameter `CFG`
   |
   = help: it is currently only allowed to use either `CFG` or `{ CFG }` as generic constants

error: `Config` is forbidden as the type of a const generic parameter
  --> $DIR/array-size-in-generic-struct-param.rs:18:21
   |
LL | struct B<const CFG: Config> {
   |                     ^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = note: more complex types are supported with `#[feature(const_generics)]`

error: aborting due to 3 previous errors