2017-07-24 21:31:59 -05:00
|
|
|
trait VecN {
|
|
|
|
const DIM: usize;
|
|
|
|
}
|
|
|
|
trait Mat {
|
|
|
|
type Row: VecN;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn m<M: Mat>() {
|
2020-04-08 11:47:09 -05:00
|
|
|
let a = [3; M::Row::DIM];
|
|
|
|
//~^ ERROR constant expression depends on a generic parameter
|
2017-07-24 21:31:59 -05:00
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
}
|