Closed
Description
The following code
pub trait HasLength {
const LENGTH: usize;
}
fn foo<T: Copy + HasLength>(x: T) -> [T; T::LENGTH] { [x; T::LENGTH] }
results in an error “error[E0599]: no associated item named LENGTH
found for type T
in the current scope”. Which is not true, it just doesn’t work in arrays yet (see #29646). The error message should reflect that.