// run-pass // // see issue #70529 #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash struct A { arr: [u8; N], } impl A { fn new() -> Self { A { arr: [0; N], } } fn value(&self) -> usize { N } } fn main() { let a = A::new(); let [_, _] = a.arr; assert_eq!(a.value(), 2); }