blob: ab86afc34102b637ee7e37794441a4c5d7b106d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
trait VecN {
const DIM: usize;
}
trait Mat {
type Row: VecN;
}
fn m<M: Mat>() {
let a = [3; M::Row::DIM];
//~^ ERROR constant expression depends on a generic parameter
//~| ERROR constant expression depends on a generic parameter
}
fn main() {
}
|