rust/src/test/ui/const-generics/derive-debug-array-wrapper.rs
Scott McMurray d6a9793722 Use const generics for array impls, restricted to 0..=32
- 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
2019-07-07 11:31:38 -07:00

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() {}