]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic-sum-in-array-length.min.stderr
Rollup merge of #77726 - fusion-engineering-forks:static-pin, r=dtolnay
[rust.git] / src / test / ui / const-generics / generic-sum-in-array-length.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/generic-sum-in-array-length.rs:7:53
3    |
4 LL | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
5    |                                                     ^ cannot perform const operation using `A`
6    |
7    = help: const parameters may only be used as standalone arguments, i.e. `A`
8
9 error: generic parameters may not be used in const operations
10   --> $DIR/generic-sum-in-array-length.rs:7:57
11    |
12 LL | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
13    |                                                         ^ cannot perform const operation using `B`
14    |
15    = help: const parameters may only be used as standalone arguments, i.e. `B`
16
17 error: aborting due to 2 previous errors
18