-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[Do not merge] Allow generic parameters to be specified in expressions without ::
#53074
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors try |
[Do not merge] Allow generic parameters to be specified in expressions without `::` Since chained comparison operators are invalid, it's plausible that the `::` disambiguation for generic parameters in expressions is no longer necessary. With the current parser infrastructure this is still a little awkward, requiring backtracking. However, it'd be nice to know just how bad backtracking is, because it _might_ turn out only to be much worse in niche edge cases, in which case the usability benefit could be worthwhile. This PR is intended solely to test the performance of these parser changes. @rust-lang/infra: would it be possible to get a perf run for this change?
A perf build should be queueable with |
I feel like this would need an RFC anyway, but good to get performance numbers so at least that's not a concern. |
@Mark-Simulacrum: yes, if this turns out to look viable, I'd definitely want to put it through the RFC process before merging anything. It's a significant change. I thought it was better to check whether it was practical first.
Thanks! |
☀️ Test successful - status-travis |
@bors-timer build 832690d |
@rust-timer build 832690d Miswrote the instructions... |
Success: Queued 832690d with parent 94c3c34, comparison URL. |
Perf is ready. 1 to 2% regression in half of the tests. |
This is better than I expected, but still not ideal. I'll try to give some thoughts to how to speed it up. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors try |
⌛ Trying commit 2066031 with merge 1d1139d2989104a9fd35a9193a27dfc2632cb981... |
☀️ Test successful - status-travis |
@rust-timer build 1d1139d2989104a9fd35a9193a27dfc2632cb981 |
Success: Queued 1d1139d2989104a9fd35a9193a27dfc2632cb981 with parent 9f9ac89, comparison URL. |
Right now, this seems implausible without changing the parser significantly. 2% increase in compile times is probably not worth the benefits. |
Since chained comparison operators are invalid, the
::
disambiguation for generic parameters in expressions is no longer syntactically necessary. With the current parser infrastructure this is still a little awkward, requiring backtracking. However, it'd be nice to know just how bad backtracking is, because it might turn out only to be much worse in niche edge cases, in which case the usability benefit could be worthwhile.This PR is intended solely to test the performance of these parser changes.
@rust-lang/infra: would it be possible to get a perf run for this change?