aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/const_generics_16.rs
blob: 060dbda79de61bacb634976086e048b226bc6ef2 (plain)
1
2
3
4
5
6
7
8
9
10
#[lang = "sized"]
trait Sized {}

struct Foo<T = u8, const N: usize = 4> {
    data: [T; N], // { dg-warning "field is never read: .data." }
}

fn main() {
    let _x = Foo { data: [1, 2, 3, 4] };
}