Associated constant doesn't exist?


#1
pub trait AsBytes {
    const LENGTH: usize;
    fn as_bytes(&self) -> [u8; Self::LENGTH];
}

The error, on line 3, is that no associated item named 'LENGTH' found for type 'Self' in the current scope. But Self is an AsBytes, isn’t it? :confused:


#2

Known issue: https://github.com/rust-lang/rust/issues/34344


#3

Oh, cool. :frowning: