We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Thank you for syn and all your Rust work!
I ran into this issue while debugging this: roignpar/optfield#4 It seems that attribute macros have no access to attrs defined before them.
#[before] #[after] struct Item;
If both before and after are attribute macros:
before
after
Item
attrs
The same happens with any kind of attribute in relation to attribute macros.
I haven't tried this with other proc macro types.
Most documentation I could find was here: https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros, but it says that "The second TokenStream is the rest of the item including other attributes on the item." I couldn't find any mention of attribute order or anything like that.
Is this intended behavior?
The text was updated successfully, but these errors were encountered:
This issue is not related to syn. Syn is not in control of what tokens rustc passes into an attribute macro.
Sorry, something went wrong.
No branches or pull requests
Hi! Thank you for syn and all your Rust work!
I ran into this issue while debugging this: roignpar/optfield#4
It seems that attribute macros have no access to attrs defined before them.
If both
before
andafter
are attribute macros:before
will haveafter
inItem
'sattrs
fieldafter
will not havebefore
inItem
'sattrs
fieldThe same happens with any kind of attribute in relation to attribute macros.
I haven't tried this with other proc macro types.
Most documentation I could find was here: https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros, but it says that "The second TokenStream is the rest of the item including other attributes on the item."
I couldn't find any mention of attribute order or anything like that.
Is this intended behavior?
The text was updated successfully, but these errors were encountered: