#![feature(associated_consts)]
trait Foo {
const ID: usize;
}
impl Foo for i32 {
const ID: usize = 1;
}
fn main() {
let arr: [i32; i32::ID];
}
I had a quick look at the rfc but I couldn't find out if it should be legal to use associated-constants in constant expressions.
https://doc.rust-lang.org/book/associated-constants.html
https://is.gd/L4Fg4k
I had a quick look at the rfc but I couldn't find out if it should be legal to use associated-constants in constant expressions.