Illegal impl block

Can anyone explain why this impl is not allowed? I am trying to make it so I can call functions on my arrays and not have to iterate over it to call functions on the elements of the array.

type Bufs<const N: usize> = [Buf; N];
impl<const N: usize> Bufs<N> {
}

Coherence (only having one implementation of any given method). If you could implement inherent methods for primitive types, so could I, and then our crates could not compose without violating coherence.

Put the methods you want in a custom trait (that's what the error was suggesting).

trait ArrayExt {
    fn method(&self);
}

impl<const N: usize> ArrayExt for Bufs<N> {
    fn method(&self) {
        // ...
    }
}

Note that type does not introduce a new type, it is merely an alias. So your Bufs<N> is exactly the same type as [Buf; N].

Another option would be New Type Idiom - Rust By Example

just a reminder, if you find yourself needing to create many extension traits, you can use easy-ext to reduce the boilerplates:

#[easy_ext::ext]
impl<const N: usize> Bufs<N> {
    //...
}