-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Set tokens on AST node in collect_tokens
#80993
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 3d2458d6e89f30fe223f6b522e447f23111db04a with merge 735a2bd051c45fc592af35d8b243b1a7f1a97052... |
☀️ Try build successful - checks-actions |
Queued 735a2bd051c45fc592af35d8b243b1a7f1a97052 with parent 9bc8b00, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (735a2bd051c45fc592af35d8b243b1a7f1a97052): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
A new `HasTokens` trait is introduced, which is used to move logic from the callers of `collect_tokens` into the body of `collect_tokens`. In addition to reducing duplication, this paves the way for PR rust-lang#80689, which needs to perform additional logic during token collection.
3d2458d
to
a961e67
Compare
@petrochenkov I've addressed your comments |
@Aaron1011 |
Code LGTM. |
I ran perf to see if this was responsible for part of the performance impact of #80689 - it looks like it's responsible for a small part. |
@petrochenkov: It looks like the regression is only for very short benchmarks (e.g. |
@bors r+ |
📌 Commit a961e67 has been approved by |
⌛ Testing commit a961e67 with merge d5ce9be8014b33b0078bca9b7c666ce3a874b22c... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
A new
HasTokens
trait is introduced, which is used to move logic fromthe callers of
collect_tokens
into the body ofcollect_tokens
.In addition to reducing duplication, this paves the way for PR #80689,
which needs to perform additional logic during token collection.