- uses a never-stable core::array::LengthAtMost32 to bound the impls - includes a custom error message to avoid mentioning LengthAtMost32 too often - doesn't use macros for the slice implementations to avoid #62433
9 lines
267 B
Rust
9 lines
267 B
Rust
#![feature(const_generics)]
|
|
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
|
|
|
#[derive(Debug)]
|
|
struct X<const N: usize> {
|
|
a: [u32; N], //~ ERROR arrays only have std trait implementations for lengths 0..=32
|
|
}
|
|
|
|
fn main() {}
|