blob: cff5a62193c379fef3751941e0858cd7c1e75ab5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
error: generic parameters may not be used in const operations
--> $DIR/generic-sum-in-array-length.rs:6: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`
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/generic-sum-in-array-length.rs:6: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`
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
error: aborting due to 2 previous errors
|