sam0x17/macro_magic

Does it work with Generics?

kianenigma opened this issue · 4 comments

Asking this here as @gupnik is on vacation and I am looking for a quick answer:

does macro magic work if the name of the token being exported has some generics?

The use-case is the situation we see in

https://github.com/kianenigma/flite/blob/0259cba7b7d6d446a13cbf74a4989e907a4ba56e/runtime/src/lib.rs#L86-L123

Happy to sponsor the work needed for this with a DOT tip :)

reported it lol.. bot? How did I attract this lmao

at a glance yes you should be able to do this using the with_custom_parsing stuff, just figure out how you want to format the macro input and do the parsing for that yourself

at a glance yes you should be able to do this using the with_custom_parsing stuff, just figure out how you want to format the macro input and do the parsing for that yourself

Yeah, this should work. Basically, the exported tokens would have a similar name as the current one, but the expansion would use the generic.

I don't think we need anything more from this crate particularly @sam0x17 @kianenigma.