]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr
Rollup merge of #78083 - ChaiTRex:master, r=m-ou-se
[rust.git] / src / test / ui / const-generics / issue-61522-array-len-succ.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/issue-61522-array-len-succ.rs:7:45
3    |
4 LL | pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
5    |                                             ^^^^^ cannot perform const operation using `COUNT`
6    |
7    = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
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/issue-61522-array-len-succ.rs:12:30
12    |
13 LL |     fn inner(&self) -> &[u8; COUNT + 1] {
14    |                              ^^^^^ cannot perform const operation using `COUNT`
15    |
16    = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
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