summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/array-wrapper-struct-ctor.rs
blob: a712f691dbe2242cfbf64957f057bb379bff7870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass

#![allow(dead_code)]

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]);
}