]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-61522-array-len-succ.rs
Auto merge of #74932 - nnethercote:rm-ast-session-globals, r=petrochenkov
[rust.git] / src / test / ui / const-generics / issue-61522-array-len-succ.rs
1 #![feature(const_generics)]
2 //~^ WARN the feature `const_generics` is incomplete
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() {}