I tried this code:
#![feature(const_trait_impl)]
#[const_trait]
pub trait Index {
type Output;
}
#[const_trait]
pub trait IndexMut: Index {
fn foo(&mut self) -> <Self as Index>::Output;
}
I expected to see this happen: compiles
Instead, this happened: errors
Meta
latest nightly