Closed
Description
pub trait Foo {
const SIZE: usize;
fn whatever() {
// compiles fine
let _x = [Self::SIZE, 3usize];
// fails with error[E0599]: no associated item named `SIZE` found for type `Self` in the current scope
let _y = [3usize; Self::SIZE];
}
}
This looks like a bug to me - I believe both rows should compile just fine.
It exists in both stable and nightly.