-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Keep space if arg does not follow punctuation when lint unused parens #138271
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
base: master
Are you sure you want to change the base?
Conversation
r? compiler |
Computing source information can be very expensive, since this operates on the "good path". @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Keep space if arg does not follow punctuation when lint unused parens Fixes rust-lang#138234 If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected. And `emit_unused_delims` can make sure no more space will be added if the expr follows space.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3bb53a8): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.4%, secondary -0.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 19.9%, secondary 65.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 775.776s -> 779.66s (0.50%) |
oops... |
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
Fixes #138234
If the arg follows punctuation, still pass
left_pos
withNone
and no space will be added, else then passleft_pos
withSome(arg.span.lo())
, so that we can add the space as expected.And
emit_unused_delims
can make sure no more space will be added if the expr follows space.