Skip to content
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

Recognize underscore token to avoid slow path #198

Merged
merged 2 commits into from Dec 27, 2021
Merged

Recognize underscore token to avoid slow path #198

merged 2 commits into from Dec 27, 2021

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 27, 2021

It turns out _ is one of very few things still hitting the parser-based slow path after the recent optimizations for literals and lifetimes. Although _ is considered an Ident by the proc macro API, it does not match macro_rules's $:ident matcher and must be treated separately.

@dtolnay dtolnay merged commit f45df31 into master Dec 27, 2021
@dtolnay dtolnay deleted the underscore branch December 27, 2021 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant