-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
newtype_index macro DEBUG_FORMAT = custom
not working
#45763
Comments
Are you just missing a comma after the rust/src/librustc_data_structures/indexed_vec.rs Lines 289 to 296 in 98e4b68
|
Yeah I wasn't paying a lot of attention to the macro definition, anyway ... with comma ...
With comma and making custom a string ....
|
So ... or either I don't understand how to use the macro or there's a bug somewhere. |
Yes, I think there is a bug. There is a base case for custom debug format but no rule for parsing that from the macro input like there is for rust/src/librustc_data_structures/indexed_vec.rs Lines 93 to 97 in 98e4b68
|
@durka, actually after checking, the case you mentioned is not the right match arm. We should be going through rust/src/librustc_data_structures/indexed_vec.rs Lines 93 to 97 in 98e4b68
|
Yeah that is the one I linked. But that's the end of the macro, there needs to be another parsing rule that eats |
@durka exactly! |
OK, I figured out what the issue is. Parsing What needs to be done I believe is changing |
After changing what you've said I'm getting ...
|
Now you have |
Hey @durka, thanks, I think it's working now. I'm testing it and will open a PR if everything is OK. Thanks for the tips, at some point I'd need to read at least something about macros ;). |
DEBUG_FORMAT = custom
not working
Make last structs indexes definitions use newtype_index macro This PR makes the last two index structs not using newtype_index macro to use it and also fixes this #45763 issue.
I'm trying to change
DefIndex
to be defined using newtype_index and calling newtype_index macro this way ...Does not work.
/cc @Nashenas88 @nikomatsakis
The text was updated successfully, but these errors were encountered: