Want good errors when template applied to wrong kind of driver
In several the examples, @nickm proposed define_derive_adhoc!{ Template for struct = ...
etc.
I don't much like this because it's extra syntax. But we should have something to do this job, rather than just producing terrible compiler errors. Possibilities:
- Something like the
... for struct ...
syntax - Ask the template author to write
${assert is_struct}
in the template - Somehow detect that the template is probably useless on enums eg if it has no
${v...}
expansions mabye? But how to override this?