You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to hand over information between these two macro executions, so that depends_on_inner knows that impl Test has a function with a #[inner] attribute?
The text was updated successfully, but these errors were encountered:
I'm uncertain if there's a common way to relay information. depends_on_inner can parse its input and notice the presence of the inner attribute, but I'm uncertain if that's guaranteed (see #692 and its linked issues).
For future reference if anyone stumbles upon this issue:
Instead of defining #[inner] as a separate macro, process it (assuming you're using syn) by detecting it from ImplItem::attributes and then passing it to the same processor fn you otherwise would. If you need #[inner] to work on its own you must name the version bound to #[depends_on_inner] differently as order of expansion is not guaranteed and might change depending on target/version.
Let's assume you have two user defined proc_macro_attributes in the following order:
Is there any way to hand over information between these two macro executions, so that depends_on_inner knows that impl Test has a function with a #[inner] attribute?
The text was updated successfully, but these errors were encountered: