Associated constant doesn't exist?

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:

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

1 Like

Oh, cool. :frowning: