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

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

struct Matrix<T, const ROWS: usize, const COLS: usize> {
    data: [[T; COLS]; ROWS],
}

fn main() {
    let _: Matrix<u8, 2, 3> = Matrix {
        data: [[1, 2, 3], [4, 5, 6]],
    };
}