blob: 3b627a5e5301b78926733bd24fb2580891e68e4a (
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 and may cause the compiler to crash
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() {}
|