Skip to content

Instantly share code, notes, and snippets.

Created January 21, 2017 00:03
Show Gist options
  • Save anonymous/73a223aa33c081bf47d84c2bf52fcc19 to your computer and use it in GitHub Desktop.
Save anonymous/73a223aa33c081bf47d84c2bf52fcc19 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
#![feature(associated_consts)]
trait VecN {
const DIM: usize;
}
trait Mat {
type Row: VecN;
}
fn m<M: Mat>() {
let a = [3; M::Row::DIM];
}
fn main() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment