Skip to content

Misc. cleanups to librustdocs "clean" fns #142848

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yotamofek
Copy link
Contributor

Small cleanups while working on bigger stuff.

Might have very slight performance improvement (408dc50 avoids a few unneeded Clones), but I doubt they'll register on a perf run. So this is mostly just making the code (hopefully) a bit nicer.

@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 21, 2025
@GuillaumeGomez
Copy link
Member

I'm surprised by this change, but looks good to me. Let's confirm perf results and then let's r+ it. :)

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 22, 2025
bors added a commit that referenced this pull request Jun 22, 2025
Misc. cleanups to `librustdoc`s "clean" fns

Small cleanups while working on bigger stuff.

Might have very slight performance improvement (408dc50 avoids a few unneeded `Clone`s), but I doubt they'll register on a perf run. So this is mostly just making the code (hopefully) a bit nicer.
@bors
Copy link
Collaborator

bors commented Jun 22, 2025

⌛ Trying commit eb8e7d4 with merge 3c1d700...

@bors
Copy link
Collaborator

bors commented Jun 22, 2025

☀️ Try build successful - checks-actions
Build commit: 3c1d700 (3c1d700d9816ba61883b811680a446c4ed7a12e6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3c1d700): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 1
All ❌✅ (primary) -0.5% [-1.3%, 0.3%] 2

Max RSS (memory usage)

Results (secondary -1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.6%, -1.3%] 6
All ❌✅ (primary) - - 0

Cycles

Results (primary 1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.5% [1.5%, 1.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.5% [1.5%, 1.5%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 689.082s -> 690.29s (0.18%)
Artifact size: 371.89 MiB -> 371.92 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 23, 2025
@GuillaumeGomez
Copy link
Member

Seems like it ends with the small perf reduction in syn2.

@yotamofek
Copy link
Contributor Author

Ah damn, let me see if I can keep some of the cleanups while resolving the perf hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants