New issue
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
parsing variables/constants #1241
Comments
Closing as a duplicate of #963. |
@dtolnay you closed the issue but there is no solution for this in the community. Could you provide a way to implement this? |
Hi, correct me if I'm wrong, but this is impossible to do.
I am however having a hard time understanding what exactly you're trying to do. If you use the macro invocation when you have your constant in the module namespace, and you apply that macro to a function (like in your example), then wherever you import that function, the constant will stay resolved, since it's an implementation detail of that function and in that case only the function really cares about what the constant is or where it comes from and users don't... |
Hi! I'm trying to pass and parse a constant from my proc_macro in order to get the value of that constant. This constant may be declared in another module, so it wouldn't work to parse as a
syn::ItemConst
What I'm trying to do is something like this:
Is there any way to do this? I've been looking for a way but no luck. Thank u in advance!
The text was updated successfully, but these errors were encountered: