]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issue-61522-array-len-succ.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / const-generics / issue-61522-array-len-succ.rs
1 #![feature(const_generics)]
2 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
3
4 pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
5 //~^ ERROR constant expression depends on a generic parameter
6
7 impl<const COUNT: usize> MyArray<COUNT> {
8 fn inner(&self) -> &[u8; COUNT + 1] {
9 //~^ ERROR constant expression depends on a generic parameter
10 &self.0
11 }
12 }
13
14 fn main() {}