-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
can't compile a macro_rules!
macro that includes #[godot_api]
proc macro with attempt to impl a godot node interface
#996
Comments
Related: #379 |
pretty-printing out what
changing it to
so it seems like this is set to a group containing the entire type path with no delimiter for |
yeah looking at it simply just takes the entire type expression and puts it into a |
Oh, so venial would need to special-case the "group with empty delimiter" and unpack its individual elements into a |
i think so? im not 100% sure it's the right thing to do, but it definitely would make sense for me to have it work like that. since even though it's technically not a path, it's an invisible delimiter group, it still is a path. |
Fixed upstream in PoignardAzur/venial#60. Added test for this in #1008, which will only pass once venial is updated. |
Per discord thread here:
https://discord.com/channels/723850269347283004/1192118392660963338/threads/1323828276720046102
Here is a small repro case:
Which fails to compile with this error:
the error message
error: invalid Self type for #[godot_api] impl
can be traced to here:gdext/godot-macros/src/class/godot_api.rs
Line 45 in b619959
If you expand this in VSCode, and paste it in place of the macro invocation, it compiles without issue. Here is that expanded macro for reference:
@Bromeon also recommended trying the macro without using
:ty
and:path
, and indeed, using:ident
instead does compile:The text was updated successfully, but these errors were encountered: