I find the following code cannot be compiled:
#![feature(const_generics)]
#![feature(specialization)]
struct S<const ND:usize>{}
trait Type{
type tt;
}
default impl<const ND:usize> Type for SSS<ND>{
type tt=<SSS<{ND-1}> as Type>::tt;
}
impl Type for SSS<0>{
type tt=i32;
}
fn main() {
let a=SSS::<3>{};
}
I find this limit is set on purpose as is described here in order to prevent some ICE.
Will this limit be removed in the near future? (e.g., when const generic becomes stable).