]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic-function-call-in-array-length.min.stderr
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020...
[rust.git] / src / test / ui / const-generics / generic-function-call-in-array-length.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/generic-function-call-in-array-length.rs:9:39
3    |
4 LL | fn bar<const N: usize>() -> [u32; foo(N)] {
5    |                                       ^ cannot perform const operation using `N`
6    |
7    = help: const parameters may only be used as standalone arguments, i.e. `N`
8
9 error: generic parameters may not be used in const operations
10   --> $DIR/generic-function-call-in-array-length.rs:12:13
11    |
12 LL |     [0; foo(N)]
13    |             ^ cannot perform const operation using `N`
14    |
15    = help: const parameters may only be used as standalone arguments, i.e. `N`
16
17 error: aborting due to 2 previous errors
18