blob: 526f98fe8cd4f3e182b13c636c606df744797baf (
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-function-call-in-array-length.rs:9:39
|
LL | fn bar<const N: usize>() -> [u32; foo(N)] {
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
= 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-function-call-in-array-length.rs:12:13
|
LL | [0; foo(N)]
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
error: aborting due to 2 previous errors
|