linkme icon indicating copy to clipboard operation
linkme copied to clipboard

Document follow-up attributes

Open djmitche opened this issue 2 years ago • 1 comments

It seems like

#[distributed_slice(FOO)]
#[linkme(crate=::mycrate::linkme)]
static BENCH_DESERIALIZE: fn(&mut Bencher) = bench_deserialize;

causes distributed_slice to refer to the linkme crate as ::mycrate::linkme. But, I don't see this documented anywhere. I don't quite understand it well enough to write those docs myself :)

djmitche avatar Aug 24 '22 19:08 djmitche

Would definitely appreciate this being documented -- I spent a bit of time trying to find another solution before finding it. My use case was to to wrap linkme declarations with my own macro_rules macro to simplify this for users of an API and to do that you do need to re-write the paths -- I suspect this is a fairly common pattern.

jcrevier avatar Jan 16 '24 15:01 jcrevier