blob: 7c8cdeece871892abe59b859f91b85c7e15eff4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete
pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
//~^ ERROR constant expression depends on a generic parameter
impl<const COUNT: usize> MyArray<COUNT> {
fn inner(&self) -> &[u8; COUNT + 1] {
//~^ ERROR constant expression depends on a generic parameter
&self.0
}
}
fn main() {}
|