summary refs log tree commit diff
path: root/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr
blob: 36a0a37ae9c3f69b2a16bf1bc34a6bd2b2ec7eaf (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/issue-61522-array-len-succ.rs:6:45
   |
LL | pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
   |                                             ^^^^^ cannot perform const operation using `COUNT`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
   = 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/issue-61522-array-len-succ.rs:11:30
   |
LL |     fn inner(&self) -> &[u8; COUNT + 1] {
   |                              ^^^^^ cannot perform const operation using `COUNT`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
   = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to 2 previous errors