]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.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
9 error: generic parameters may not be used in const operations
10 --> $DIR/issue-61522-array-len-succ.rs:12:30
11 |
12 LL | fn inner(&self) -> &[u8; COUNT + 1] {
13 | ^^^^^ cannot perform const operation using `COUNT`
14 |
15 = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
16
17 error: aborting due to 2 previous errors
18