]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr
Auto merge of #76160 - scileo:format-recovery, r=petrochenkov
[rust.git] / src / test / ui / const-generics / issue-61522-array-len-succ.min.stderr
1 error: generic parameters must not be used inside of non trivial constant values
2   --> $DIR/issue-61522-array-len-succ.rs:7:45
3    |
4 LL | pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
5    |                                             ^^^^^ non-trivial anonymous constants must not depend on the parameter `COUNT`
6    |
7    = help: it is currently only allowed to use either `COUNT` or `{ COUNT }` as generic constants
8
9 error: generic parameters must not be used inside of non trivial constant values
10   --> $DIR/issue-61522-array-len-succ.rs:12:30
11    |
12 LL |     fn inner(&self) -> &[u8; COUNT + 1] {
13    |                              ^^^^^ non-trivial anonymous constants must not depend on the parameter `COUNT`
14    |
15    = help: it is currently only allowed to use either `COUNT` or `{ COUNT }` as generic constants
16
17 error: aborting due to 2 previous errors
18