When using function element shorthand (attribute directly on the function) together with the #[linkme] attribute, the attribute wasn't consumed and left for the compiler to try and expand as a macro, which failed. To fix, the attribute is now consumed from the function and passed on to code generation for the static variable referencing the function.
Also included is a test case for that scenario and documentation how to use the #[linkme] attribute.
Thanks for creating this library, it's incredibly helpful.
When using function element shorthand (attribute directly on the function) together with the #[linkme] attribute, the attribute wasn't consumed and left for the compiler to try and expand as a macro, which failed. To fix, the attribute is now consumed from the function and passed on to code generation for the static variable referencing the function. Also included is a test case for that scenario and documentation how to use the #[linkme] attribute.
Thanks for creating this library, it's incredibly helpful.