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