IIRC derive and attribute macros via declarative macro definitions are coming soon, which probably obviates this?
https://github.com/rust-lang/rust/issues/143549