]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic-sum-in-array-length.min.stderr
Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearth
[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    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
9
10 error: generic parameters may not be used in const operations
11   --> $DIR/generic-sum-in-array-length.rs:7:57
12    |
13 LL | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
14    |                                                         ^ cannot perform const operation using `B`
15    |
16    = help: const parameters may only be used as standalone arguments, i.e. `B`
17    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
18
19 error: aborting due to 2 previous errors
20