aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/const_generics_9.rs
blob: 98e2d3ff068336044e13ee47c5ab1c97f256aaff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-options "-w" }

#[lang = "sized"]
trait Sized {}

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

pub fn test() -> [u8; 4] {
    let a = ArrayWrapper { data: [1u8; 4] };
    a.data
}