rust/src/test/ui/const-generics/broken-mir-2.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

11 lines
288 B
Rust

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
use std::fmt::Debug;
#[derive(Debug)]
struct S<T: Debug, const N: usize>([T; N]);
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
fn main() {}