Const/generic on stable Rust

Is there anyway to get this working on stable Rust ?

pub trait Foo {
    type Blah;
    const N: usize;

    fn write(b: &Self::Blah, out: &mut [u8; Self::N]);

This exists:

1 Like

Other than using typenum, no, unfortunately

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.