blob: d3f7143327ead8f5023faff290ae4468be4eb9b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  | 
error: generic parameters may not be used in const operations
  --> $DIR/generic-sum-in-array-length.rs:7:53
   |
LL | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
   |                                                     ^ cannot perform const operation using `A`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `A`
error: generic parameters may not be used in const operations
  --> $DIR/generic-sum-in-array-length.rs:7:57
   |
LL | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
   |                                                         ^ cannot perform const operation using `B`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `B`
error: aborting due to 2 previous errors
 
  |