Idea: explicit type parameters for derivation

We can probably reuse the same attribute proc_macro_derive and detect whether there's an additional parameter in the function instead.

Another approach, which might be more useful overall, is to just pass the #[derive(...)] stuff to the derive macro itself. That would also allow custom derive macros to do things like "consider the other derived traits" like #[derive(Copy, Clone)] does for optimization purposes.

1 Like