-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Reorder arguments in quote_token
and quote_token_spanned
#210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you're changing every $crate::quote_token_spanned!
call site. There are some that are missed in this PR. (Maybe also some $crate::quote_token!
? I didn't look too carefully)
It looks just how I expected, modulo the missed changes. I was also going to try putting I would also put a brief comment above |
Thanks to the both of you for the review, I'll make the changes asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Oh you were super quick, I was completing the latest couple changes nick mentioned :) I'll open another PR in a few minutes. |
Testing on the same 6 crates, and in a micro-benchmark: the |
This PR implements the suggestion in #209 (review) to reorder the arguments to these macros, and avoid some parsing of idents during rule matching.
The tests succeed but I'm not familiar with
quote
's internals, and may have made a mistake, especially on the more complicated rules.If it's correct, this would result in a small improvement: