I was trying to create a derive macro for my trait, to simplify some stuff.
I've encountered some problems:
the
#[proc_macro_derive]attribute is only usable with crates of theproc-macrocrate type
and, after the small fix proc-macro=true:
proc-macrocrate types cannot export any items other than functions tagged with#[proc_macro_derive]currently functions tagged with#[proc_macro_derive]must currently reside in the root of the crate`
What is the reason for this behavior?