about summary refs log tree commit diff
path: root/src/test/ui/const-generics/array-wrapper-struct-ctor.rs
blob: d83846fcf88d44fc93a765e6086051c68be1464c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

struct ArrayStruct<T, const N: usize> {
    data: [T; N],
}

struct ArrayTuple<T, const N: usize>([T; N]);

fn main() {
    let _ = ArrayStruct { data: [0u32; 8] };
    let _ = ArrayTuple([0u32; 8]);
}